Coder Social home page Coder Social logo

leaflet.mouseposition's Introduction

Leaflet.MousePosition

Leaflet.MousePosition is a simple mouse position control that you can drop into your leaflet map. It displays geographic coordinates of the mouse pointer, as it is moved about the map.

Using the Mouse Position Control

Insert the following line:

...
L.control.mousePosition().addTo(map);
...

Available Options:

These are the available options:

position: The standard Leaflet.Control position parameter. Defaults to 'bottomleft'

separator: To separate longitude\latitude values. Defaults to ' : '

emptystring: Initial text to display. Defaults to 'Unavailable'

numDigits: Number of digits. Defaults to 5

lngFirst: Weather to put the longitude first or not. Defaults to false

lngFormatter: Custom function to format the longitude value. Defaults to undefined

latFormatter: Custom function to format the latitude value. Defaults to undefined

prefix: A string to be prepended to the coordinates. Defaults to the empty string ‘’.

leaflet.mouseposition's People

Contributors

ardhi avatar saik0 avatar tofferrosen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

leaflet.mouseposition's Issues

How can I install this plugin?

Thanks for this plugin. Sorry to open this problem but I think it is necessary to add in the readme file how to install the plugin.

Bower support?

Do you think you would be able to support the bower architecture?

You would need to add a bower.json file and add the library to their list.

Please let me know if you are interested, and need any help.

Option for DMS?

What is the option to display coordinates as DMS?
Thank you

Coordinates incorrect at or beyond -85, -180, 85, 180

When moving the mouse above or below the latitude bounds (85º for Mercator maps), the latitude value should probably be capped at 85º.

When moving the mouse east or west beyond 180º, the longitude value should show the correct longitude for that copy of the world rather than continuing past 180º or -180º.

Easting, northing UTM coordinates

Maybe it is possible to display the Projected Coordinates (eg. UTM Easting and Northing) instead of lat/lng by using conversion libraries like proj4js. The projection system can be added as an extra parameter.

Possible DMS support

Hello,

I was wondering if I could request the support of DMS, currently with the function for both lat and lng separately it makes it hard for me to do the conversion.

If there was a latLngFormatter that would solve this issue.

Thank you! 😄

_onMouseMove is not working on android / chrome

This plugin does not work with some versions of android / chrome.

In particular Chrome and "WebView" (android application) show the text "Unavailable" instead of the actual location. On the same hardware I have found that the built in "Browser" for android does work as expected. I need this plugin to work with WebView

The actual platform is Android 4.4.3 on HTC-One

device-2014-11-19-115953

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.