Home › Forums › MapPress Support › initialopeninfo does not work in mashup
Tagged: Initialopeninfo with mashup
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by
Chris.
-
AuthorPosts
-
November 13, 2018 at 10:13 am #18064
javierdario
ParticipantHi Chris,
I am trying the mashup shorcode for my first time. I think this mode can save me a lot of time. However I can not get to open the first POI with the command initialopeninfo.
I have tried with the normal maps and it works, but it doesn´t with the mashup.
You can have a look to this page:
https://imaginaisladepascua.com/en/easter-island-sightseeing/hanga-roa/hanga-roa-map/The code for Map1 is:
[mashup query="post__in=13935,13938,13954,13961" sort="false" zoom="14" width="100%" height="600" poilist="true" initialopeninfo="true"]The code for Map2 is:
[mappress mapid="101" sort="false" zoom="14" width="100%" height="600" poilist="true" initialopeninfo="true" center="-27.149062, -109.424600"]Any idea which is the problem? Thank you.
November 13, 2018 at 10:17 am #18066Chris
KeymasterHi,
I’m sorry, but the initialopeninfo parameter is not supported for mashups, only for individual maps.
The code needed to make it work with mashups is convoluted, so it’s not something I currently plan to implement, but if others need that functionality please comment here and let me know.
November 17, 2018 at 11:08 am #18068javierdario
ParticipantThank you Chris.
Ok. That’s a pity. Anyway, I am going to try with two more questions:
Is it possible to center the icon and the open popup when I do click on an icon? Is this possible to do it with normal maps and mashup maps?
It would be possible to filter the icons shown on a map by taxonomy? I mean if I have a map of a town and I want to show only the hotels or restaurants. You have something similar with categories and tags, but it would be great if I could do it with pages and parent pages.
Waiting for your comments
Thanks again
November 17, 2018 at 11:10 am #18074Chris
KeymasterHi,
The map doesn’t center when an icon is clicked, but it moves to make room for the popup. Both Leaflet and Google work this way by default.
You cannot use parent pages for filtering, but you could assign parents+children to the same taxonomy (categories, tags, or a custom taxonomy) and use that.
If you are familiar with PHP, you could also use filter
mappress_query_filter
to adjust the query results based on the filters. Please see file ‘mappress_query’ to see where that filter is called. -
AuthorPosts
- You must be logged in to reply to this topic.