locked
When clicking a map control or closing a popup, the entire page does a postback causing the map position and points to be lost RRS feed

  • Question

  • When I add any map controls, such as the controls that allow you to zoom-in and out, or the map types, and attempt to use them, the entire page does a post-back and the map resets to its default position, zoom and type. The same thing occurs when the map has points on it that has pop-up boxes. When the pop-up box is shown with the point's details, and the small "X" in the top right corner is clicked, the entire page posts again and everything is lost, including any points that were originally added.

    I'm using guides here: https://docs.microsoft.com/en-us/azure/azure-maps/map-add-controls and here: https://docs.microsoft.com/en-us/azure/azure-maps/map-add-popup.

    Everything works, with the exception of the controls (but then again they might be working, but since the page "refreshes" I can't really say for certain.) and the pop-up close button.

    The map is hosted on a ASPX server page. Is there a property on the page that I should address that might prevent these post-backs from occurring? It's a major problem that is essentially making using Azure Maps impossible for what I need.

    Thoughts?
    Thursday, December 13, 2018 11:00 PM

Answers

  • I am using the HTML, CSS and JS.

    I actually was able to figure out the problem was that I had the map in an AJAX update panel with the children as triggers property set to "True." I simply changed it to false and set the update mode to "Conditional" and it's working now.

    Thursday, December 20, 2018 5:55 PM

All replies

  • Hi Zach,

    We are evaluating this internally. Can you double confirm that you are using the HTML, CSS and JS as is from the articles you mentioned?

    Thanks

    Wednesday, December 19, 2018 3:17 PM
  • I am using the HTML, CSS and JS.

    I actually was able to figure out the problem was that I had the map in an AJAX update panel with the children as triggers property set to "True." I simply changed it to false and set the update mode to "Conditional" and it's working now.

    Thursday, December 20, 2018 5:55 PM
  • Great. Glad you found the issue. Thanks for sharing your solution. 
    Friday, December 28, 2018 6:17 PM