Support » Plugins » Dynamically-generated google maps

  • Hi,

    I am writing code that will hopefully become a wordpress plugin in the future.

    I would like to code the following functionality:
    * display of a map with pointers indicating the
    locations of the posts diplayed in a blog page (I have limited the
    visualization to 5 posts per page). I take the locations saved in the post tags. My geocoder works correctly and I get the correct coordinates. I store these coordinates in a array and in a php file.
    The code and the problem is also described here:

    but the solutions suggested so far did not work 🙁
    Why is javascript not displaying pointers specified in a dynamically
    generated array/file, while it has no problem with a static
    Is it a problem with “timing”? That is, javascript is executed before
    the array is completed created? it should not be so, as i specified
    “onload” … 🙁

Viewing 1 replies (of 1 total)
  • Eureka! I did find the solution of my error. Instead of specifying the Javacript code that takes care of the pointers and GoogleMaps in the header, I moved it to the bottom of the index.php. This means that the map data will be processed only when my Geocoder has finished its job and the pointer list/array is complete!

    The interaction between PhP and Javascript was not completely clear to me 🙂


Viewing 1 replies (of 1 total)
  • The topic ‘Dynamically-generated google maps’ is closed to new replies.