For this demo, i have used the new Google maps Api (V3) available here.
I have developed 2 versions of the demo, 1 “standalone” Web App and an other Web App using the WebApp-Net framework.
This very basic Web application will display your location when you click on the “Get Location” button. If you click on the “Watch Location”, the map will be refreshed each time your location has changed. To stop the tracking, you need to press the “Clear watch” button.
The location method used to retrieve your location can be GPS, WIFI, or other methods provided by the network.
As described in the next code, a div(map_canvas) is used to display the map.
Google Maps initialization:
The initialize function initializes the Geocoder (used to return the address) and initialize the map. A default location is provided during the initialization.
Go to this URL with your IPhone to test the application. http://visticot.frederic.perso.neuf.fr/webapp/loc/index-basic.html
Using the application, you can see that you can scroll the map !!!
Using the WebApp-Net framework
I wanted to test if the WebApp-Net framework was “compatible” with the Google maps and Location Api. No particular “tricks” needs to be solved during the development. You simply need to add the div used to display the map as described in the next picture:
Go to this URL with your IPhone to test the application. http://visticot.frederic.perso.neuf.fr/webapp/loc/index.html
Actually, scrolling the map like the previous application is not possible, some investigation need to be done with the WebApp-Net framework.