leaflet icon size based on lat/lon degree?

Multi tool use
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I want to plot multi markers on Leaflet like a grid map.
We often seen icons based on pixel size, but I couldn't find case that used lat/lon-sized(e.g. 0.5 degree) icons.
What should I do?
↓In the ordinary way, icon-size base on pixel...
var myIcon = L.Icon.extend(
options:
iconSize: [20, 20],
iconAnchor: [10, 10],
popupAnchor: [0, -10]
);
leaflet
add a comment |Â
up vote
1
down vote
favorite
I want to plot multi markers on Leaflet like a grid map.
We often seen icons based on pixel size, but I couldn't find case that used lat/lon-sized(e.g. 0.5 degree) icons.
What should I do?
↓In the ordinary way, icon-size base on pixel...
var myIcon = L.Icon.extend(
options:
iconSize: [20, 20],
iconAnchor: [10, 10],
popupAnchor: [0, -10]
);
leaflet
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to plot multi markers on Leaflet like a grid map.
We often seen icons based on pixel size, but I couldn't find case that used lat/lon-sized(e.g. 0.5 degree) icons.
What should I do?
↓In the ordinary way, icon-size base on pixel...
var myIcon = L.Icon.extend(
options:
iconSize: [20, 20],
iconAnchor: [10, 10],
popupAnchor: [0, -10]
);
leaflet
I want to plot multi markers on Leaflet like a grid map.
We often seen icons based on pixel size, but I couldn't find case that used lat/lon-sized(e.g. 0.5 degree) icons.
What should I do?
↓In the ordinary way, icon-size base on pixel...
var myIcon = L.Icon.extend(
options:
iconSize: [20, 20],
iconAnchor: [10, 10],
popupAnchor: [0, -10]
);
leaflet
leaflet
edited Sep 10 at 5:59
asked Sep 10 at 4:06


Eriko nukui
215
215
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Doing markers in other units is probably technically possible, but not advisable or practical.
The main advantage of pixels as a measurement that the symbols remain the same size as you zoom in and out (change the scale).
If you choose meters or degrees, this doesn't happen. When zoomed into a town, a degree-sized symbol would be larger than the screen.
If you use (for example) 10km as the marker size, these would be dots when fully zoomed out. So you'd need to change the size for each zoom level.
A second issue - specific to degrees - is that a degree of longitude is longer near the equator than at the poles. This means your symbols will shrink or distort the further away from the equator you are.
Add to this the fact that you'd need Leaflet to do all the formulae for each marker, and account for zoom level/scale, it's probably best to stick with pixels :)
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Doing markers in other units is probably technically possible, but not advisable or practical.
The main advantage of pixels as a measurement that the symbols remain the same size as you zoom in and out (change the scale).
If you choose meters or degrees, this doesn't happen. When zoomed into a town, a degree-sized symbol would be larger than the screen.
If you use (for example) 10km as the marker size, these would be dots when fully zoomed out. So you'd need to change the size for each zoom level.
A second issue - specific to degrees - is that a degree of longitude is longer near the equator than at the poles. This means your symbols will shrink or distort the further away from the equator you are.
Add to this the fact that you'd need Leaflet to do all the formulae for each marker, and account for zoom level/scale, it's probably best to stick with pixels :)
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
add a comment |Â
up vote
2
down vote
Doing markers in other units is probably technically possible, but not advisable or practical.
The main advantage of pixels as a measurement that the symbols remain the same size as you zoom in and out (change the scale).
If you choose meters or degrees, this doesn't happen. When zoomed into a town, a degree-sized symbol would be larger than the screen.
If you use (for example) 10km as the marker size, these would be dots when fully zoomed out. So you'd need to change the size for each zoom level.
A second issue - specific to degrees - is that a degree of longitude is longer near the equator than at the poles. This means your symbols will shrink or distort the further away from the equator you are.
Add to this the fact that you'd need Leaflet to do all the formulae for each marker, and account for zoom level/scale, it's probably best to stick with pixels :)
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Doing markers in other units is probably technically possible, but not advisable or practical.
The main advantage of pixels as a measurement that the symbols remain the same size as you zoom in and out (change the scale).
If you choose meters or degrees, this doesn't happen. When zoomed into a town, a degree-sized symbol would be larger than the screen.
If you use (for example) 10km as the marker size, these would be dots when fully zoomed out. So you'd need to change the size for each zoom level.
A second issue - specific to degrees - is that a degree of longitude is longer near the equator than at the poles. This means your symbols will shrink or distort the further away from the equator you are.
Add to this the fact that you'd need Leaflet to do all the formulae for each marker, and account for zoom level/scale, it's probably best to stick with pixels :)
Doing markers in other units is probably technically possible, but not advisable or practical.
The main advantage of pixels as a measurement that the symbols remain the same size as you zoom in and out (change the scale).
If you choose meters or degrees, this doesn't happen. When zoomed into a town, a degree-sized symbol would be larger than the screen.
If you use (for example) 10km as the marker size, these would be dots when fully zoomed out. So you'd need to change the size for each zoom level.
A second issue - specific to degrees - is that a degree of longitude is longer near the equator than at the poles. This means your symbols will shrink or distort the further away from the equator you are.
Add to this the fact that you'd need Leaflet to do all the formulae for each marker, and account for zoom level/scale, it's probably best to stick with pixels :)
answered Sep 10 at 7:47
Steven Kay
16k21553
16k21553
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
add a comment |Â
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
Thank you for your kindness!!! I beg your pardon, I really want to make grid map like this â†ÂI made this drawing used by illustrator... Map might be Equirectangular projection, problem of poles will be solved. Can I make icon size that base on degree? I am sorry for inquisitive....
– Eriko nukui
Sep 10 at 10:10
1
1
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
Then you don't want markers, and this is either an instance of the XY problem or just a bad choice of words. You probably will want either a vectorial square grid and then some geoprocessing on your source data, or rasterize your source data into a very low-res raster. Please edit your question to provide more background (what kind of data you have, what are you trying to achieve).
– IvanSanchez
Sep 10 at 10:35
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
I sort of saw that using like GeoJSON would be most suitable. But I don't understand anything for GIS.... Should I open up a new question?
– Eriko nukui
Sep 10 at 11:13
1
1
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Please pay attention to gis.stackexchange.com/help/how-to-ask . Editing this question or opening a new one is up to you.
– IvanSanchez
Sep 10 at 11:21
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
Thank you for teaching me🤗
– Eriko nukui
Sep 10 at 11:28
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f295372%2fleaflet-icon-size-based-on-lat-lon-degree%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password