zoom, center_lng, center_lat

Home Forums MapPress Support zoom, center_lng, center_lat

This topic contains 8 replies, has 2 voices, and was last updated by  Chris 1 month, 1 week ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #18049

    RageLT
    Participant

    Hi Chris,

    On old sites, where the plugin was not updated, I used mashup with “zoom, center_lng, center_lat” now they do not work (after plugin update) how to fix it? I really need this feature.
    Maybe I can do it with php?

    [mashup query="posts_per_page=-1&category_name=catname" zoom="14" center_lat="50.08703" center_lng="14.417501" width="100%" height="400"]

    #18051

    Chris
    Keymaster

    Hi,

    I’m not sure if this is the problem, but the syntax changed slightly many versions ago. Center is now specified as “lat,lng”, for example:

    [mashup center="50, 14"]

    #18053

    RageLT
    Participant

    After 2.50.9 zoom is working perfect! Thanks. And what about center? I still have blank map with [mashup center="50, 14"]

    #18055

    Chris
    Keymaster

    Hi,

    The centering was a bug that seems to occur only when using google, and a mashup, and specifying the center. It should be fixed in 2.50.10.

    Also:

    – for the center parameter you can use lat,lng or a place or address, e.g. center=”New York”

    – if using Google, you can specify a country, e.g. “USA”

    – Leaflet can’t geocode countries, so to center on a country using Leaflet, use lat,lng and a zoom instead

    #18056

    RageLT
    Participant

    Ok.
    Can you give me hot patch fix here, what to replace in php code?center=”New York” works well, but not for my needs.
    It is important for me to center a specific part of the city, such as a metro station and attractions around this station.

    #18057

    Chris
    Keymaster

    I’m not sure what you want fixed?

    You can use center=”lat,lng”, center=”address” or center=”place”. To center on a metro station, use a street address or lat,lng.

    #18058

    RageLT
    Participant

    When I use center=”lat,lng” I have blank (empty) map.
    Screenshot here: https://i.imgur.com/Dbi2WLk.png
    And without center, it works: https://i.imgur.com/kvG7Osb.png

    #18062

    RageLT
    Participant

    Okey, 2.50.10.
    Center and zoom works separately. But do not work together.
    [mashup center="50.08703,14.43088" zoom="12"] (center only)
    Is it possible to stabilize the operation of these parameters?

    #18063

    Chris
    Keymaster

    Hi,

    Just to be clear: center/zoom for mashups was removed many versions ago, and a lot has changed since then. Adding it back requires new development, not just a patch or a bug fix.

    I think I have it working, but I’d like to test it before it’s published. Could you please use the contact form to send me an email with your blog URL and an admin login? That way I can install the latest version for you to test.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.