Skip Navigation

[Resolved] Google Maps – SKU: Basic Embed and Toolset

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to know if it's possible to use the Google Maps Embed API to save on costs.

Solution: Toolset Maps doesn't use the Embed API, but you could implement it yourself using an iframe. This use of Google Maps isn't officially supported here in the forums.

Relevant Documentation:https://developers.google.com/maps/documentation/embed/guide

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 3 voices.

Last updated by adameD 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1313681

Hi guys,

I have 2 kinds of Google Maps:

1. showing all posts on a large map with filters
2. simple maps inside posts with only 1 marker showing the post's location

According to Google Maps Pricing:
hidden link

"SKU: Embed
This SKU refers to a basic Maps Embed API request that uses Place mode (to embed a map with a marker) or View mode (to embed a simple map). Basic Embed requests remain free with unlimited usage."

Is it possible to make simple Toolset maps inside posts to be counted as SKU: Embed?

Looking at my billing report and comparing it to my traffic, I think these maps are currently counted as something else.
But on my site, the visitor can switch on Street View and I also use a custom map style - perhaps it influences the SKU that is used... I don't know.

If I could turn those simple maps into SKU: basic embed that would be great...

And for what it's worth, I really wish Toolset supported Leaflet/Mapbox... I played with Azure Maps many months ago and could not find a single advantage over Google Maps, only lots of disadvantages, and the pricing wasn't transparent at all. Leaflet and Mapbox are true alternatives to Google Maps... and still not many plugins support them at all, so I'd say Toolset could easily grab a share of the market...

Cheers,
Tom

#1313987

Hi, Toolset Maps features don't use the Embed API, but you could implement it yourself with an iframe. The documentation for implementing the embed feature is here: https://developers.google.com/maps/documentation/embed/guide
Basically you would create an iframe with a dynamic URL using the address from an address field, and some other URL parameters that set different attributes of the map. I can show you how to access the address from an address custom field if you need assistance with that part, but the Embed API isn't officially supported here in the forums.

Keep in mind that geocoding an address (i.e. submitting an address custom field in wp-admin) still requires use of the Geolocation API, so if you're trying to avoid that cost you would have to use a different custom field type. The problem with using a different input type is it's not going to work with Toolset's distance-based filters or sorting, and the address isn't guaranteed to be mappable.

As far as open source map alternatives, I agree that would be a great feature, but our developers haven't committed to it yet. I encourage you to submit your request in our form here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
This will let the management know it's important for you, and can influence decisions about new features added to the software.

#1318357

Thank you very much Christian. Your reply pointed me in the right direction.
I played with Google Embed API... embedding these maps is much simpler than I initially thought. But as far as I can tell, Google Embed API doesn't support custom map styles...

So, then I read Mapbox documentation and figured out it's relatively simple to insert customized maps with single markers. I use custom fields for latitude/longitude + zoom ratio. Then my Toolset content template inserts a Mapbox map based on the custom fields' values. Surprisingly easy and I didn't need an additional plugin. And Mapbox maps look great.

Cheers,
Tom

#1321881

@Thomas, do you mind sharing how did you add the Mapbox with markers based on custom fields?

Thanks!