Home › Forums › MapPress Support › Open POI via URL parameter
- This topic has 3 replies, 3 voices, and was last updated 9 years, 10 months ago by
Chris.
-
AuthorPosts
-
April 3, 2013 at 1:27 am #12135
Hi, is it possible to pass a parameter trough the URL that opens a page with MapPress mashup and a specific POI with the InfoWindow/InfoBox open?… Tkx
April 3, 2013 at 5:43 am #12140Hi,
No, but there’s an ‘initialopeninfo’ parameter that lets you open the first poi or one of your choice (they’re numbered starting at 0). Maybe you can just put a shortcode on each target page with that parameter set to the right poi?
For example this should open the 3rd poi:
[mappress initialopeninfo="2"]
April 4, 2013 at 3:30 am #12147I’m currently into the same challenge displaying a map (via the mashup-shortcode) with opening and zooming to a specific POI on load.
My shortcode looks currently like this:
[mashup query="p=10" width="100%" height="300" adaptive="true" zoom="15" initialOpenInfo="1"]
This pulls the map from PageID 10 and displays the 2nd POI.
I have 12 POIs (and some »lines«) and so far it kind of works, but I get different results:almost all POIs are displayed correct, but the InfoWindow is sometimes closed, sometimes it is openend. This is reproduceable, e.g. POI #1 is always closed, POI #5 is always closed. It is very mixed, which one is open, and which one is closed.
one POI zooms to a wrong location: The marker is not within the visible area, InfoWindow is closed… I tried to set the position again and save the POI – the result is still wrong.Is there another option to display a specific POI? For example a javascript that zooms to the POI after the page is completely loaded?
Is there a chance to have the InfoWindows all closed OR all opened (I would prefer the closed-state for all markers)
What could be the problem with that one POI which zooms to a wrong map area?
Thanks!
April 4, 2013 at 5:58 am #12150A URL for your map would help so I could see it!
What you describe with some open and some closed sounds like a timing problem in which the map is still centering while they’re being opened.
Your POI that zooms to the wrong area: I don’t know, but check the individual map for it, perhaps the location saved for it doesn’t correspond to the title (for example you can title it “New York City” but put the marker in the middle of the ocean.
You asked about other ways to open POIs. You can also open them using javascript – for example after document ready. There’s a javascript example here:
http://mappresspro.com/mappress-documentation#toc-open-or-zoom-a-poi-using-javascript
-
AuthorPosts
- You must be logged in to reply to this topic.