Ask a questionAsk a question
 

General DiscussionAdding Shapes To Layer Causes Automatic ZoomLevel Change

  • Thursday, November 05, 2009 7:16 AMResponse.Cookies Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Problem

    When I add shapes to layer, it causes the map to automatically zoom.  It zooms out by a factor of 1.

    Is this because the shapes end up being on the outside of the map border?

    If so, what is the workaround?
    Is there a method or property to disable the autozoom?

    Scenario

    I'm loading a dynamic xml file based on the lat/lon of the topleft and bottomright map attributes when the onmousewheel and onmousemove events are raised.

    So, the autozooming is quite inconvenient as I am trying to query for only things on the map at the current zoom level.

    The SQL query is something like "select * from places where lat > minlat and lat < maxlat and lon > minlon and lon < maxlon"

    Thanks in advance for the help!






All Replies