mrmufflon / leaflet.coordinates Goto Github PK
View Code? Open in Web Editor NEWLeaflet plugin to view mouse coordinates
Home Page: http://mrmufflon.github.io/Leaflet.Coordinates/
License: Other
Leaflet plugin to view mouse coordinates
Home Page: http://mrmufflon.github.io/Leaflet.Coordinates/
License: Other
I mean, it's pretty common, are there any chances to implement it? Because currently it shows my coordinates in Lat/Lon format, and there's no option to override it.
Hi,
I just tried webjars.org to convert this plugin to a webjar. http://www.webjars.org/npm fails though, telling me that bintray would not accept your project as the licence is not one of the ones listed at the bottom of https://bintray.com/docs/api/#_footnote_1
Could you perhaps check whether one of those licences is near to what you intend with CC 3?
Replace "map" by "this._map" on lines 96 & 137
Appears that 'toDMS' function in Leaflet.Coordinates-0.1.5.src.js is not checking for cases when minutes and/or seconds are equal to zero.
Hello,
I have tried all options in the css but the space around the control still persists.
How do you put the control right along the map edge, both bottom/top and left/right?
Thank you.
problem: clicking on the newly created marker removes it instead of popping up
the information, for example:
Longitude: -2,94 Latitude: 33,94
Remove
My workaround:
and in _createNewMarker return the evaluated string...
_createNewMarker: function() {
// return this.options.markerType(null, this.options.markerProps);
return eval(this.options.markerType + '(null,' + this.options.markerProps + ')');
}
I use the control along with bootstrap 3.2.0,I load bootstrap css,leaflet css and control css in that order,I find that the live update of location is not displayed,instead a tiny white rectangle displays above the rectangle.
Screenshot: http://bit.ly/1tCTIrM
I have added the .ie css file after the control's css,screenshot at http://bit.ly/11PQC7h
TypeError: this._ordinateLabel is not a function
at NewClass.collapse (Leaflet.Coordinates-0.1.5.min.js:2)
quando enableUserInput: true.
I'm developing a web GIS and we are using Coordinates to track mouse coordinates, but we need some features more like:
In case of tooltip, we want to indicate to the user that he can do an action clicking in the control, this has become a requirement of UX.
I will maybe work on minor features, like a way to exit of edition mode of the control to cancel de action and I want to contribute with your plugin, how exactly I can do? Some guidelines? Or just do a pull request? I made a fork of the project too.
Hi, I've been experimenting with this and was wondering if it's supposed to allow users to enter coordinates and hit enter to move the map to that location?
Currently it seems like you can enter coordinates but you can't make it go to it?
Thanks,
Shige
The line
should beif (opts.labelFormatterLng) {
I did:
npm install --save leaflet.coordinates
Then in "CoordinatesControl.js":
import 'leaflet'
import 'leaflet.coordinates'
This results in:
Error in ./src/components/Projekte/Karte/CoordinatesControl.js
Module not found: 'leaflet.coordinates'
What could I be missing?
There is a possible conflict with bootstrap css. If you add bootstrap css(), Latlng will not be displayed.
Is it possible to display the seconds coordinates with two more decimal places? for example: 8˚ 12' 14,23"
If the decimal option is more then 0, and I move my mouse around a map quickly, the widget flickers between a few sizes when the mouse is on coords with no decimal. If you pad the output with zeros that would not happen.
Hi
while holding mouse button down and moving about the map pans as expected but coordinates keep changing. mouse locked on position so coordinates should not change.
Kind regards Daniel
Replace opts.labelFormatterLng(ll.lat);
by opts.labelFormatterLat(ll.lat);
in file "Control.Coordinates.js" on Line 138
In the main mage there are 3 errors:
1: labelFormatterLng : function(lng){return lng+" lng"}, //optional default none,
2: labelFormatterLat : function(lat){return lat+" lat"}, //optional default none
3: customLabelFcn: function(latLonObj, opts) { return "Geohash: " + encodeGeoHash(latLonObj.lat, latLonObj.lng)} //optional default none
IN bold the errors!
New feature suggestion:
Instead of useDMS:false, what about passing in an array of one or more output formats. Multiple formats would stack in the order passed in.
{format: ['dms']} would be like useDMS:true currently returns
{format: ['ddm']} would be a new format... most GPSs use this format and probably most human readable (if you're not a programmer)
{format: ['dd']} would be like useDMS:false currently returns
{format: ['dms', 'ddm', 'dd']} would stack all three of them in the output container
degrees minutes seconds output
Lat: 40° 26′ 46″ N, Lon: 79° 58′ 56″ W
degrees decimal minutes output
Lat: 40° 26.767′ N, Lon: 79° 58.933′ W
decimal degrees output
Lat: 40.446, Lon: -79.982
Hi, can you submit your package to NPM so we can use Bower or NPM to download your package? Thanks
If you scroll left or right across the dateline, coordinates do not wrap by default (on the demo page)
Hello,
I'd like to use your plugin on a L.CRS.Simple projection Leaflet map using X, Y, Z coordinates. What would I need to change in the code to make it display the X, Y, and Z coordinates instead of latitude and longitude? Any help is much appreciated, thanks!
Tested on latest Firefox.
The demo doesn't work as is because is using the version 1.3
Hi!
Just to let you know that I have to do a change in function _createCoordinateLabel
from:
if (opts.labelLng) {
x = opts.labelFormatterLng(ll.lng);
} else {
to:
if (opts.labelFormatterLng) {
x = opts.labelFormatterLng(ll.lng);
} else {
Now formatting works for both Latitude and Longitude
thanks
Using safari 10.0.3 on a Mac running OS X 10.10.5, the live demo fails to load map tiles. On the console, I get numerous messages like
Failed to load resource: A server with the specified hostname could not be found. http://otile3.mqcdn.com/tiles/1.0.0/map/6/34/24.jpeg.
Attempting to follow that link gives a "Safari can't find the server" error.
There is a problem when compiling the project. It's expected to work running npm install
and then grunt
, but errors came up instead.
Also, if you force compilation, the files created have a different name from the prebuilt ones (the prebuilt are capitalized).
In addition, I think it would be useful keeping the same filename for built files between versions (there are better places to show version numbers, in package.json for example), so then it isn't necessary to change any paths at projects depending on this one.
I am trying to use this with babel and ES6 notation. I have done npm install --save leaflet.coordinates
and see the directory in my node_modules. When I try to do
import 'leaflet.coordinates'
from my script, babel gives me an error:
Error: Cannot find module 'leaflet.coordinates' from '/path/to/main.jsx'
If I copy Leaflet.Coordinates-0.1.5.src.js
to my directory an do
import './leaflet.coordinates.jsx'
instead, then I am able to run babel and the component shows up on my map.
Comparing the package.json for leaflet and leaflet.coordinates, I see that leaflet has an entry for main
which is missing. In fact, adding this line
"main": "dist/Leaflet.Coordinates-0.1.5.src.js",
to package.json let babel succeed.
I am using Leaflet.Coordinates-0.1.3.min.js, but coud not set decimals to 0.
It no working.
example is at http://88.198.32.130/test/MG2Map/map.html
This isn't necessarily an issue, but a question.
I want to have this plugin operate like the demo inside the Django Admin, but upon pressing Enter
it attempts to submit the form.
How can I associate a preventDefault to the keypress?
The package doesn't work with this leaflet version?
Adding this to bower?
Would it be possible to make the order (lng-lat, or lat-lng) an option?
Error in Control.Coordinates.js - createCoordinateLabel: function(ll) {
at :
if (opts.labelLng) { x = opts.labelFormatterLng(ll.lng);
labelLng is not defined.
possible fix:
if (opts.labelFormatterLat) { x = opts.labelFormatterLng(ll.lng);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.