diff options
author | Silvio <silvio@socioambiental.org> | 2013-04-03 19:21:00 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-04-03 19:21:00 -0300 |
commit | 65a99e2f5773d58724ef210b0195af2ef235e7b8 (patch) | |
tree | db43eaf55f30ca4493994065eeb3f1ff6debb7e0 /examples | |
parent | 02f9d1058e622d5e8c0abcdd907d57dd50549209 (diff) | |
download | gmap_arcgis_js-65a99e2f5773d58724ef210b0195af2ef235e7b8.tar.gz gmap_arcgis_js-65a99e2f5773d58724ef210b0195af2ef235e7b8.tar.bz2 |
Adding examples
Diffstat (limited to 'examples')
-rw-r--r-- | examples/example.html | 1 | ||||
-rw-r--r-- | examples/example.js | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/examples/example.html b/examples/example.html new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/examples/example.html @@ -0,0 +1 @@ +TODO diff --git a/examples/example.js b/examples/example.js new file mode 100644 index 0000000..dc9bf1c --- /dev/null +++ b/examples/example.js @@ -0,0 +1,50 @@ +// Map element +var mapID = 'map'; + +// Service URL +var mapService = 'TODO'; + +// Set map options +var mapOptions = { + center: new google.maps.LatLng(0, 0), + zoom: 5, + scrollwheel: false, + mapTypeId: google.maps.MapTypeId.TERRAIN, +}; + +// Create a map instance +var map = new google.maps.Map(document.getElementById(mapID), mapOptions); + +// Setup a gmapArcgis wrapper +var myGmapArcgis = new gmapArcgis({ + map: map, + + mapName: mapID, + + layers: { + mylayer: { + overlayTime: 5000, + uri: mapService, + opacity: 0.65, + layers: [1], + showOn: [ 'map' ], + }, + + markers: { + mymarker: { + uri: mapService + '/1', + overlayTime: 2000, + fields: [ ], + content: markerCallback, + icon: 'example.png', + showOn: [ 'map' ], + }, + }, +}); + +myGmapArcgis.addLayers('mylayer'); +myGmapArcgis.addMarkers('mymarker'); + +function markerCallback(attributes) { + return attributes.join(' '); +} |