Center and Zoom POI with Javascript

Home Forums MapPress Support Center and Zoom POI with Javascript

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15293
    utcommoffice
    Participant

      On a mashup map, that loads at zoom=10 by default i have all the POIs (custom — not using mappress poi) connected with the POI in the map using:
      <a onclick="mapp0.getPoi(5).open(); return false;"

      Is there a way that i can combine the .center(15) with this statement so that when i click on the POI listing, the POI is zommed in and open on the MAP ?

      Thank you.

      #15300
      Chris
      Keymaster

        I’m not sure I understood what you’re trying to do, but this may help:

        the default poi list calls function ‘get_open_link’ in ‘mappress_poi.php’. That function takes ‘zoom’ as a parameter, so you can use it to open a POI and zoom in on the POI. You can use the onclick statement as shown in the function, or call it like this:
        <?php echo $poi->get_open_link(array('zoom' => true)); ?>

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.