Tagged: Initialopeninfo with mashup
November 13, 2018 at 10:13 am #18064javierdarioParticipant
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:
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 #18066ChrisKeymaster
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 #18068javierdarioParticipant
Thank 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 againNovember 17, 2018 at 11:10 am #18074ChrisKeymaster
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_filterto adjust the query results based on the filters. Please see file ‘mappress_query’ to see where that filter is called.
- You must be logged in to reply to this topic.