From 65a99e2f5773d58724ef210b0195af2ef235e7b8 Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 3 Apr 2013 19:21:00 -0300 Subject: Adding examples --- examples/example.html | 1 + examples/example.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 examples/example.html create mode 100644 examples/example.js (limited to 'examples') 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(' '); +} -- cgit v1.2.3