leaflet icon size based on lat/lon degree?

The name of the pictureThe name of the pictureThe name of the pictureClash 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]

);









share|improve this question





























    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]

    );









    share|improve this question

























      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]

      );









      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 10 at 5:59

























      asked Sep 10 at 4:06









      Eriko nukui

      215




      215




















          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 :)






          share|improve this answer




















          • 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










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "79"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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






























          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 :)






          share|improve this answer




















          • 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














          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 :)






          share|improve this answer




















          • 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












          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 :)






          share|improve this answer












          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 :)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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
















          • 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

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          這個網誌中的熱門文章

          Why am i infinitely getting the same tweet with the Twitter Search API?

          Is there any way to eliminate the singular point to solve this integral by hand or by approximations?

          Strongly p-embedded subgroups and p-Sylow subgroups.