Is there a way to create static maps like this? > hidden link
Or make the maps load asychronously? Or ANYTHING that would make them load faster?
I currently have 3000 posts with google maps on my website and I plan to make them more than 10000 and the site is soooooo slow on loading the map even if it only has 1 marker on it. Please help!
Hi, sure you can use an Address custom field to create a static map for a single location. First you must enable the Static Maps API for your Google Maps API key – this is a separate API that must be enabled in the Google API Console. Then you can construct the HTML tag for a static map like this:
<img src="<em><u>hidden link</u></em> field='address-field-slug'][/types]&zoom=13&size=300x150&maptype=roadmap&markers=color:red%7C&key=YOURAPIKEY" />
Change address-field-slug to match your address field. If your site is hosted on https, change the protocol to https. Change YOURAPIKEY to match your API key. You can also change the zoom and size parameters to fit your needs. Other customization can be added directly to the tag as well...you can review the full Static Map API documentation here:
https://developers.google.com/maps/documentation/static-maps/
The site is soooooo slow on loading the map even if it only has 1 marker on it
Can I see this in the browser? I'd like to investigate to see where the bottleneck occurs. Please provide a test URL.