MVC Single Page Application RRS feed

  • Question

  • I have developed a MVC web application that uses the Bing Maps Ajax Controls.  There are multiple pages that make use of the Map.  Basically the user will create a polygon to define a high level boundary.  Then on another page they will use the first polygon as a guide to create smaller sub-divisions.  On still other pages these subdivisions will be managed.  I don't want the user to have to wait for the map to load every time they change pages.  So all my navigation links are ajax calls that load the result into one section of the initial page, while the map is in another section.  This is working but it complicates everything.  Is there a way to keep the map in the browser DOM and everytime a new page is loaded, restore the map to a predetermined location on the new page?  Is there a way I can include the necessary Map API scripts in my project so they can be bundled/minified/cached?  If it helps I can post a link to the application.  It is free to use and also has tutorial videos that may help.
    Friday, November 30, 2012 4:49 AM


  • When you refresh the page the browser dom is always recreated. Using the method you are using is the normal way of keeping the map on the page without reloading it. Including the map API scripts in your project is against the terms of use and will actually slow your app down. The map control is only loaded on the first page an then cached in the browser. The waiting time you have is the actually generation of the DOM object.

    Tuesday, December 4, 2012 10:05 AM