YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar alessandra.bardauil asked

Change point Center WidgetKit Map

Hello, I would like to change the way widgetkit map centers the map, which is centered by default in the first pin, I would like to centralize my custom, as I do?

  • WordPress
  • Widgetkit

8 Answers


Avatar dougbuchan answered

We need to center the map as well:
Is there a way to set the coordinates for a map to be initially centered for a Widgetkit map? When loading data into a map, it seems to center the map around the very last entry. So if that entry is on the east coast, you see mainly east schools on the map unless you manually re-center it. I’d like it to center the map in the middle of the continental US. I might be able to force it using some tricky SQL and playing with the order of the entries in the map, but I’d rather have the map be configurable for this. YooThemes say they use the most recent Google Maps API. There is a setCenter command that would likely take care of what I’m asking.https://developers.google.com/maps/documentation/javascript/reference It’s a matter of YooThemes including three new parameters in their “content” field for each new map:1. Should the map center upon a specific coordinate (numeric: 0 or 1)2. Latitude (string)3. Longitude (string)

More information about the additional programming that may be needed at:http://stackoverflow.com/questions/1556921/google-map-api-v3-set-bounds-and-center


Avatar alessandra.bardauil answered

No, I do not want to use a marker to mark a center, I want to customize the center as my need to use markers for this


Avatar skyrun answered

NOTE: that dragging the map markers to change their order on the main widgetkit 2 map page DOES NOT WORK (for me) on chrome. However it DOES WORK on IE 11 (go figure). took me forever to figure this out because trying something on ie to see if it works there better than on chrome isn't something that occurs to me naturally.

i'll post it here in case someone else is stumped and thinks there is no way to re-order...


Avatar pascal.netenvie answered

Reorder works for me but Map always center on first marker.
How can we do if we have 2 markers and want to center in middle of it ??


Avatar kevin.daisey answered

Here's a workaround I did.

  1. Make the first marker item the center of your map.
  2. Upload a small transparent png file to the media library.
  3. Paste the url into the custom marker box.

this will center the map and not show a marker for the "location" due to the transparent blank png file.

Know someone who can answer? Share a link to this question via email or twitter.