initialopeninfo does not work in mashup

Home Forums MapPress Support initialopeninfo does not work in mashup

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18064
    javierdario
    Participant

    Hi 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.

    #18066
    Chris
    Keymaster

    Hi,

    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.

    #18068
    javierdario
    Participant

    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 again

    #18074
    Chris
    Keymaster

    Hi,

    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.

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