Multiple Markers
Javascript Source
function myInitializeAPI() { var mapDiv = 'map'; //id of the div where the map should appear var mapType = 'default'; var mapLanguage = 'A'; var proxyUrl = ''; var apiClientKey = 'you-api-key'; SANGC_LoadMapViewer(mapDiv, mapType, mapLanguage, proxyUrl, apiClientKey); }; function myLocations() { //--- set own marker's icon; set this after map is loaded. SANGC_AddaMarkerSymbol('red','./images/marker-1.png'); SANGC_AddaMarkerSymbol('blue','./images/marker-2.png'); //--- show multiple markers on map. SANGC_AddMarker(1993544, 46.716738, 24.650482, 'Location-1', 'red', 32, ['', null, null, null]); SANGC_AddMarker(1993544, 39.94877293, 21.47928850, 'Location-2', 'blue', 32, ['', null, null, null]); SANGC_AddMarker(1993544, 50.01360102, 26.55175392, 'Location-3', 'red', 32, ['', null, null, null]); SANGC_AddMarker(1993544, 46.74720321, 24.70392908, 'Location-4', 'blue', 32, ['معارض', 2, 2, 1]); }
HTML Source
<div style="top:0px; margin-left:60px;"> <input id="showmarkers" type="button" value="Show Multiple Markers" onclick="myLocations();"> </div> <div id="map" style="position:absolute;overflow:hidden;width:500px;height:600px; margin:0px; padding:0px; background-color:white;">