Auto zooming

Home Forums MapPress Support Auto zooming

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14605

    Hi,

    I’ve added some POIs programmatically to the map in two ways.

    In the first case, I’ve created a map object and added POIs there, and called display() funtion directly to display the map.
    In the second case, I’ve hooked a custom function to ‘mappress_map_display’ action and added POIs there, and used the shortcode to display the map.
    Showing the first map, map is zoomed correctly (map automatically contains all POIs).
    Regarding the second map, map is not zoomed (a world map is shown).

    I want to zoom the map correctly in the second case.

    Please help.

    Thanks in advance,
    Isao

    #14612
    Chris
    Keymaster

    Hi,

    I really can’t say, since it depends on your custom code. Are you sure it’s necessary to use custom code for this? It seems like you could just display a mashup with the additional 3 locations included from a map attached to a post.

    I can tell you that in general the map won’t autozoom/center if you provide a center or zoom parameter.

    #14622

    Hi,

    Custom code is necessary for me.
    I use Mappress with user management plugin. Every users have address custom field, and I want to show a map with all users which address is assigned to POI.
    So the first case works fine, I could gave up the second case.

    Thanks,
    Isao

    PS. Sorry for my poor English.

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