Demonstrates the use of the API and GeoExtUX_ZoomTo widgets to set the map cente, modify it by dragging the center marker around and listen to the marker updates to get its position. These are accomplished by using the GeoPrisma.setCenter() and by listening to the "centermarkerchanged" event.

First, click on the "Add Marker" button. It calls GeoPrisma.setCenter() using hardcoded values to zoom to Ville de Saguenay. Because this demo is configured with a GeoExtUX_ZoomTo widget, the zooming is managed by it instead of the API widget. In addition to setting the map center, a marker is also added. This is the default behavior for this widget.

The GeoExtUX_ZoomTo widget is configured with the "enableDrag" option, which allow you to drag the center marker around, which update the position informations obtained by listening to the "centermarkerchanged".

The coordinates returned that way will always be in the map projection, so if you want them to be reprojected you can do so yourself as demonstrated.

See sample.inc.js for the JavaScript source code of this demo.