OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2019-01-17 10:54:34

Team On
Member
Registered: 2019-01-17
Posts: 1

what geoJSON variation is this code

My search for a geojson forum led me here, if there is a better place, please let me know.

I do not recognize the code below, it seems to be geojson, but pasting it in http://geojsonlint.com/ had error messages. Does anyone recognize this, is this a certain library, leaflet plug in or whatever? It should result in two out of 360 piece cakes in Germany (not Africa), in this notation longitude and latitude is reversed.

The source code is way longer with more geostuff.

     

	var polygon = new L.polygon([[51.54905,7.320867], [51.558043201943,7.320867], [51.647975221377,7.320867], [51.73790724081,7.320867], [51.827839260244,7.320867], [51.917771279677,7.320867], [52.007703299111,7.320867], [52.097635318544,7.320867], [52.187567337978,7.320867], [52.277499357411,7.320867], [52.279555053757,7.320867], [52.279441972593,7.3417046903146], [52.277386599679,7.3416450909712], [52.187468700353,7.3390431535982], [52.097550744028,7.3364517187814], [52.007632731117,7.3338707103785], [51.917714662029,7.33130005296], [51.827796537169,7.3287396718026], [51.737878356941,7.3261894928792], [51.647960121741,7.3236494428518], [51.558041831964,7.321119449063], [51.54905,7.320867]], {
 	color: '#0f3',
 	weight: 1,
 	opacity: 0.4,
 	fillOpacity: 0.15
 	}).addTo(map);
 	 
 	polygon.bindPopup('<a href="?gccode=GC4FXPC&profile_name=Team+On&submit=Filter&degree=0">0-1 degrees</a>');
 	 
 	overlayLayers.Polygons = polygon;
 	 
 	var polygon = new L.polygon([[51.54905,7.320867], [51.558041831964,7.321119449063], [51.647960121741,7.3236494428518], [51.737878356941,7.3261894928792], [51.827796537169,7.3287396718026], [51.917714662029,7.33130005296], [52.007632731117,7.3338707103785], [52.097550744028,7.3364517187814], [52.187468700353,7.3390431535982], [52.276632938012,7.3416232385411], [52.276295056608,7.3623728408306], [52.268060818484,7.3618952886004], [52.178185251904,7.3566943867944], [52.088309457568,7.3515144612534], [51.998433437125,7.3463553600455], [51.908557192211,7.3412169326606], [51.818680724444,7.3360990299945], [51.72880403543,7.3310015043315], [51.638927126757,7.3259242093287], [51.54905,7.320867]], {
 	color: '#f30',
 	weight: 1,
 	opacity: 0.4,
 	fillOpacity: 0.2
 	}).addTo(map);
 	 

Offline

#2 2019-01-17 14:07:47

escada
Moderator
Registered: 2011-08-13
Posts: 1,528

Re: what geoJSON variation is this code

My guess is Leaflet, see the starters example on their website : https://leafletjs.com/examples/quick-start/

Offline

Board footer

Powered by FluxBB