0% found this document useful (0 votes)
16 views2 pages

GIS Tile URL Generation Guide

Uploaded by

krutik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

GIS Tile URL Generation Guide

Uploaded by

krutik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

var countiesTiles = {

getTileUrl: function (coord, zoom) {

// Compose URL for overlay tile


var s = [Link](2, zoom);
var twidth = 512;
var theight = 512;

//latlng bounds of the 4 corners of the google tile


//Note the coord passed in represents the top left hand (NW) corner of
the tile.
var gBl = [Link]().fromPointToLatLng(new
[Link](coord.x * twidth / s, (coord.y + 1) * theight / s)); // bottom
left / SW
var gTr = [Link]().fromPointToLatLng(new
[Link]((coord.x + 1) * twidth / s, coord.y * theight / s)); // top right
/ NE

// Bounding box coords for tile in WMS pre-1.3 format (x,y)

var bbox = parseFloat([Link]()) + "," + parseFloat([Link]()) + "," +


parseFloat([Link]()) + "," + parseFloat([Link]());

[Link](bbox);

//base WMS URL


var url = "[Link]

url += "?apiKeyImage=" + $('#aik').val();


url += "&imageTypeName=Sentinel-2";
//url += "&imageDate=2023-07-09T00%3A00%3A00.000Z";
url += "&imageDate=" + encodeURIComponent(date);
url += "&imageIndexName=" + layerTypeId;
if (layerTypeId == "PlantHealth")
url += "&imageIndexSubName=General";
//url += "&fieldId=3608471c-d580-4594-b5e8-673e4da9a638";
url += "&crs=EPSG%3A4326";
url += "&bbox=" + encodeURIComponent(bbox);
[Link](url);
return url
//return `wms(${url})`
},
tileSize: new [Link](512, 512),
opacity: 0.85,
isPng: true
};

var customMapType = new [Link](countiesTiles);


//[Link](0, customMapType);
[Link](customMapType);

Url'deki
apiKeyImage => the key i me tioned
imageTypeName => thr Name in request
imageDate => rrquest Day
imageIndexName => layer name
imageIndexSubName => if imageIndexName = PlantHealth this vill be added and value
will be General
crs => EPSG%3A4326 (always)
bbox => calculate like upside. Corners of map . Haritanın köşe bilgileri bottom-
left lng, bottom-left lat, top-right lng, top-right lat

You might also like