Giter Site home page Giter Site logo

leaflet.coordinates's People

Contributors

bkrrrr avatar jekuno avatar mrmufflon avatar pedroetb 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

leaflet.coordinates's Issues

Remove space around the control?

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.

Markers are created, but then disappear when clicked on

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:

  • have the _createNewMarker return L.marker();
    OR
  • in the options put single quotes around the values so that they are strings:
    //leaflet marker type
    markerType: 'L.marker',
    //leaflet marker properties
    markerProps: '{}'

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 + ')');
}

Problema com collapse

TypeError: this._ordinateLabel is not a function
at NewClass.collapse (Leaflet.Coordinates-0.1.5.min.js:2)
quando enableUserInput: true.

Contribution

I'm developing a web GIS and we are using Coordinates to track mouse coordinates, but we need some features more like:

  1. Centralize instead set a mark
  2. Show a tooltip indicating that action

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.

Entering coordinates?

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

"Module not found" error when importing from npm

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?

Conflict with bootstrap css

There is a possible conflict with bootstrap css. If you add bootstrap css(), Latlng will not be displayed.

Padding decimals with zeros to avoid flickering

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.

mouse grab

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

Typos in How ot Use:

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!

Degrees decimal minutes as return format?

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

Download package from NPM

Hi, can you submit your package to NPM so we can use Bower or NPM to download your package? Thanks

L.CRS.Simple XYZ coordinate support?

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!

labelFormatterLng had to change a condition to make it work

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

Grunt build problems

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.

Package.json requires "main" for babel

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.

Pop up form creates markers but also submits form.

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?

Variable name error

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

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.