Software Engineering in WordPress, PHP, and Backend Development

Tag: Google Maps API (Page 2 of 2)

Integrating Google Maps in WordPress

As mentioned in the first post in this series, I’m going to be talking about a few of the different Google Maps APIs and how we can integrate them into our WordPress projects.

Rather than actually build a plugin that covers this material, I’m going to be creating a template to demonstrate some of this functionality. Though I’m a strong advocate for separating functionality and presentation, the work required to get a plugin up and running requires a lot of boilerplate code.

That isn’t inherently a bad thing, but I thought it’d be a chance of pace to simply introduce a template and then begin adding the necessary code from there (and making any changes to functions.php from there).

At the end of the series, we can then take a look and see how to abstract all of the work that we’ve done into a child theme to use.

Continue reading

Using The Google Maps API and WordPress

One of the challenges that comes with working with any new API is learning how to use it. And by that, I mean generally overcoming the learning curve – and I believe that this

Some libraries and frameworks have some relatively easy APIs once you grok the basics (and I think WordPress falls into this camp), and others don’t necessarily have the easiest APIs (such as, say, Google Maps).

The thing is, it’s different for all of us. What’s easy for me may not be easy for you and vice versa, and that’s okay. I think we need to stop treating one another as if it says something about our intelligence if we aren’t able to pick up something as fast as someone else.

That’s probably content for another post.

Anyway, for the past few months, I’ve been doing more work with the Google Maps API than I’ve ever done thus far in my career. All of the work as been done within the context of WordPress, but none of it has been WordPress-specific.

By that, I mean that the work that I’ve done is used within a WordPress plugin but there’s nothing that requires WordPress for it to run – the code could be abstracted and generalized into a standard PHP application and used.

I don’t write about that, though. I tend to keep my focus on what it’s like to work with WordPress in a professional capacity. So over the next few posts, I thought it might worth taking a look at some of the ways that you may want to employ the Google Maps API in your project, what it entails, and how to get started with it so you have some clue as to what you’re doing whenever you need to build something with the API.

Continue reading

Newer posts »

© 2024 Tom McFarlin

Theme by Anders NorenUp ↑