You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.9 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>amMap example</title>
  6. <link rel="stylesheet" href="../ammap/ammap.css" type="text/css">
  7. <script src="../ammap/ammap.js" type="text/javascript"></script>
  8. <!-- map file should be included after ammap.js -->
  9. <script src="../ammap/maps/js/worldLow.js" type="text/javascript"></script>
  10. <script>
  11. var map;
  12. function writeDevInfo(event) {
  13. document.getElementById("devInfo").innerHTML = event.str;
  14. }
  15. AmCharts.ready(function() {
  16. map = new AmCharts.AmMap();
  17. map.balloon.color = "#000000";
  18. var icon= "M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z";
  19. var dataProvider = {
  20. mapVar: AmCharts.maps.worldLow,
  21. images:[{latitude:40.3951, longitude:-73.5619, svgPath:icon, color:"#CC0000", scale:0.5, label:"New York", labelShiftY:2, zoomLevel:5, title:"New York", description:"New York is the most populous city in the United States and the center of the New York Metropolitan Area, one of the most populous metropolitan areas in the world."}]
  22. };
  23. map.dataProvider = dataProvider;
  24. map.smallMap = new AmCharts.SmallMap();
  25. // developer mode related
  26. map.developerMode = true;
  27. map.addListener("writeDevInfo", writeDevInfo);
  28. map.write("mapdiv");
  29. });
  30. </script>
  31. </head>
  32. <body>
  33. <p class="ammapAlert">Shift + left mouse click to get dev info of desired zoom info, longitude/latitude, left/right/top/bottom coordinates</p>
  34. <br>
  35. <div id="mapdiv" style="width: 800px; background-color:#EEEEEE; height: 500px;"></div>
  36. <br>
  37. <textarea id="devInfo" style="width:795px; height:150px;"></textarea>
  38. </body>
  39. </html>