getMapsRaster

Method Name:

getMapsRaster

This method returns Raster Maps in three themes: Bronze, Iron and Steel.

Parameters

Parameter Description Usage
latitude Latitude of central point of initial map view. (WGS 84 datum/EPSG:4326 coordinate system). Required
longitude Longitude of central point of initial map view. (WGS 84 datum/EPSG:4326 coordinate system). Required
zoom Zoom Level of initial map view Required
eleId ID of Map 'DIV' in HTML Required
mapStyle Theme to be applied to map. Possible values are: Bronze (Default), Iron and Steel. Optional

Returns:

Gets Bronze, Iron or Steel styled raster basemap tiles in png format.

Sample Code:

<!---------------- Raster sdk code sample ------------------->

<!DOCTYPE html>
<html>
	<head>	
		<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet@0.7.7/dist/leaflet.css" />

		<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
		<script src="https://unpkg.com/leaflet@0.7.7/dist/leaflet.js"></script>

		<script src="PreciselySDK-9.5.0-min.js"></script>
		<script>
			function callMapsRaster(){
				var GM = new PRECISELYAPIS_V1.maps('<your api key>');
				var Maps = GM.getMaps({latitude:40.761819, longitude:-73.997533, zoom:12}, 'responseMapDiv');
				GM.getMapsRaster(Maps, 'steel');
			}
		</script>		
	</head>

	<body>
		<h1>Maps SDK Test Page</h1>		
		<button type="button" onclick="callMapsRaster();">Maps (Raster)</button> 	
		<div style="position: relative; width: 1000px; height: 400px;">
			<div id="responseMapDiv"></div>
		</div>
	</body>
</html>