GithubHelp home page GithubHelp logo

leaflet / leaflet.graticule Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudybay/leaflet.latlng-graticule

18.0 18.0 17.0 158 KB

Lat/Lon Graticule for Leaflet map

HTML 19.11% JavaScript 80.89%

leaflet.graticule's Introduction

Leaflet was created 11 years ago by Volodymyr Agafonkin, a Ukrainian citizen living in Kyiv.

Russian bombs are now falling over Volodymyr's hometown. His family, his friends, his neighbours, thousands and thousands of absolutely wonderful people, are either seeking refuge or fighting for their lives.

Russian soldiers have already killed tens of thousands of civilians, including women and children, and are committing mass war crimes like gang rapes, executions, looting, and targeted bombings of civilian shelters and places of cultural significance. The death toll keeps rising, and Ukraine needs your help.

As Volodymyr expressed a few days before the invasion:

If you want to help, educate yourself and others on the Russian threat, follow reputable journalists, demand severe Russian sanctions and Ukrainian support from your leaders, protest the war, reach out to Ukrainian friends, donate to Ukrainian charities. Just don't be silent.

Ukrainians are recommending the Come Back Alive charity. For other options, see StandWithUkraine.

If an appeal to humanity doesn't work for you, I'll appeal to your egoism: the future of Ukrainian citizens is the future of Leaflet.

It is chilling to see Leaflet being used for documenting Russia's war crimes, factual reporting of the war and for coordination of humanitarian efforts across Europe. We commend these uses of Leaflet.

If you support the actions of the Russian government (even after reading all this), do everyone else a favour and carry some seeds in your pocket.

Yours truly,
Leaflet maintainers.


Leaflet

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 42 KB of gzipped JS plus 4 KB of gzipped CSS code, it has all the mapping features most developers ever need.

Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of modern browser features while being accessible on older ones too. It can be extended with a huge amount of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.

For more info, docs and tutorials, check out the official website.
For Leaflet downloads (including the built main version), check out the download page.

We're happy to meet new contributors. If you want to get involved with Leaflet development, check out the contribution guide. Let's make the best mapping library that will ever exist, and push the limits of what's possible with online maps!

CI

leaflet.graticule's People

Contributors

ivansanchez avatar lwsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet.graticule's Issues

Feature Request - Expose/allow Shadow on Text

As a feature request, it would be great to expose or allow adjustments to these properties for the text:

  •   context.shadowOffsetX
    
  •   context.shadowOffsetY
    
  •   context.shadowColor 
    
  •  context.shadowBlur
    

Can add graticule but cannot remove

Hi Folks, I could add the graticule with .addTo(map) function but cannot remove it using either .remove() or .removeFrom() function. The code is below. I'm likely missing something simple enough; any suggestion would be greatly appreciated. Thanks

lyrGraticule = L.latlngGraticule({
showLabel: true,
dashArray: [1, 1],
zoomInterval: [
{start: 1, end: 1, interval: 60},
{start: 1.01, end: 2, interval: 45},
{start: 2.01, end: 3, interval: 30},
{start: 3.01, end: 4, interval: 15},
{start: 4.01, end: 5, interval: 5},
{start: 5.01, end: 20, interval: 1}
]
});
ctlGraticule = L.easyButton('fa fa-th', function () {
if (map.hasLayer(lyrGraticule)) {
lyrGraticule.removeFrom(map);
};
if (!map.hasLayer(lyrGraticule)) {
lyrGraticule.addTo(map);
};
}, 'show Graticule');
map.addControl(ctlGraticule);

Change units

Could you change the units of the graticule to meters?

Archiv this fork

@IvanSanchez it looks like the intention of this fork was, to make the plugin with Leaflet v1.x compatible but this is now solved by the master repo. So I think the users should use the original one.

Sample with Leaflet 1.7.1 and the latest release from cloudybay: https://plnkr.co/edit/DHw9dG85V5iI7Epg

The only difference that I noticed was, that the repo from Leaflet organisation is available in CDN jsdelivr

Allow zoomInterval smaller than 0.5

If i use a zoomInterval smaller than 0.5 the labels getting weird.
With 0.2 for example i get a label with 50.800000000000000001W instead of 50.8W.
Same for 0.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.