Basic map creation
- Using the following script within tag <head> </head>(xxxxxxxxxxxxxx represents map key)
<script src="http://api.longdo.com/map/?key=xxxxxxxxxxxxxx"></script>
- key: For using Longdo Map API which can be obtained at Longdo Map [Detail]
- Div element for creating map within tag <body></body>
<div id="map"></div>
- JavaScript function for creating longdo.Map object within tag <head></head>
<script> var map; function init() { map = new longdo.Map({ placeholder: document.getElementById('map'), language: 'en' }); } </script>
- placeholder: A DOM element to place the map in
- Using onload within tag <body>
<body onload="init();">
Changing map layer
- Using setBase(layer)
map.Layers.setBase(longdo.Layers.TERRAIN);
example[Layers]