Home › Forums › MapPress Support › Intermittent Problems with Dynamically Generated Maps
- This topic has 3 replies, 2 voices, and was last updated 11 years, 8 months ago by
Chris.
-
AuthorPosts
-
April 2, 2012 at 3:39 am #9098
JohnK
ParticipantI’m using MapPress Pro 2.38 on a site that I run for a real estate agent and use dynamic maps extensively throughout the site. Following are the symptoms that I’m experiencing.
1) There is one page with many static POIs and that page is fine.
2) There are many pages with dynamic maps containing just 1 POI. Those are fine.
3) There is one page with 6 (at this time) dynamic POIs. All of the POIs are in the New Orleans, LA area. However, frequently, one or more POI markers will be incorrectly displayed in Nigeria or somewhere in the middle of the Atlantic Ocean. Refreshing the page several times eventually resolves the problem. The page URL is http://www.christiekennedy.net/active-listings.
4) There is one other page with about 18 dynamic POIs which behaves similarly, except that refreshing the page rarely ever resolves the problem. I am using lettered markers and the POI marker letter shown in Nigeria or the Ocean often changes, so it appears that it’s more of a timing issue on getting data back from the API since it’s not always the same POI with the problem. The page URL is http://www.christiekennedy.net/sold-listings.
Any thoughts on how I can resolve this are greatly appreciated.
John
April 2, 2012 at 1:21 pm #9103Chris
KeymasterHi John,
I’m going to guess you’re on a shared server. If so, your blog or someone else’s may be exceeding Google’s rather low geocoding limits. You can see more about this problem in the FAQ.
You can sign up for Google Premiere or move to a non-shared host, but the easiest thing to do is probably to just geocode those points you want to map before mapping them.
I’m guessing you’re mapping them by address using PHP code? If so, you can either
1. Save the points to a map in the map editor (which will geocode them) and then map them using a mashup
2) Or determine the lat/lng for each point and use the lat/lng in the map instead of the address. You can use one of the many free geocoding services for this.April 6, 2012 at 5:00 am #9130JohnK
ParticipantChris,
Thanks for the info. After reading Google’s FAQ and additional info, it seems that they not only block geocoding results for too much volume, but also for too much speed (I guess too many requests within too short a time). Since this site is not on a shared server, the only thing that made sense was the speed of the requests.
I didn’t want to go backwards by adding any manual steps into the process, so I enhanced my php code. In my loop that adds the POIs, I first check for new post meta fields containing the latitude and longitude. If found, I create the POI with the point. If not found, I geocode with the address and if I receive valid results, I add the latitude and longitude as post meta fields for use the next time.
It’s working like a charm now.
Thanks,
JohnApril 6, 2012 at 6:02 am #9131Chris
KeymasterHi John,
What a nightmare! I’m glad you got it working, though. It’s unfortunate that Google is so restrictive, but I suppose they want to encourage people to sign up with premier (by the way, if you ever do sign up, the plugin should be able to support it).
-
AuthorPosts
- You must be logged in to reply to this topic.