summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html')
-rw-r--r--sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html76
1 files changed, 76 insertions, 0 deletions
diff --git a/sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html b/sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html
new file mode 100644
index 0000000000..0783c3facb
--- /dev/null
+++ b/sandbox/lresende/sca-1.x/demos/customer-map/src/main/resources/html/index-plain.html
@@ -0,0 +1,76 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <title>Google Maps JavaScript API Example</title>
+ <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAm88JxNt0WTuRM7JcraL3dBTwM0brOpm-All5BF6PoaKBxRWWERRebL1SxVq4ZL7LvM8MmxNYPufSBA"
+ type="text/javascript"></script>
+ <script type="text/javascript">
+
+ //<![CDATA[
+
+ function load() {
+ if (GBrowserIsCompatible()) {
+ var map = new GMap(document.getElementById("map"));
+ map.addControl(new GLargeMapControl());
+ map.addControl(new GMapTypeControl());
+ map.setCenter(new GLatLng(0,0),0);
+ map.setZoom(1);
+ //map.setCenter(new GLatLng(-15.5833,-56.0833), 13);
+
+ // A function to create the marker and set up the event window
+ function createMarker(point,name,html) {
+ var marker = new GMarker(point);
+ GEvent.addListener(marker, "click", function() {
+ marker.openInfoWindowHtml(html);
+ });
+ return marker;
+ }
+
+ // ================================================================
+ // === JSON handler ===============================================
+ // ================================================================
+ process_it = function(doc) {
+ // === Parse the JSON document ===
+ var jsonData = eval('(' + doc + ')');
+
+ // === Plot the markers ===
+ for (var i=0; i<jsonData.markers.length; i++) {
+ var marker = createMarker(jsonData.markers[i].point, jsonData.markers[i].label, jsonData.markers[i].html);
+ map.addOverlay(marker);
+ }
+ }
+
+ // ================================================================
+ // === Fetch the JSON data file ====
+ GDownloadUrl("map.json", process_it);
+ // ================================================================
+
+
+ }
+ }
+
+ //]]>
+ </script>
+ </head>
+ <body onload="load()" onunload="GUnload()">
+ <div id="map" style="width: 800px; height: 500px"></div>
+ </body>
+</html> \ No newline at end of file