1

I inherited code from another person and some of the lines are as follows:

       theMap.on('click', function(e) {
        minx = (e.latlng.lng - 0.0000001).toFixed(7);
        miny = (e.latlng.lat - 0.0000001).toFixed(7);
        maxx = e.latlng.lng.toFixed(7);
        maxy = e.latlng.lat.toFixed(7);

Does this mean that these display the coordinates of the map on a single click?

  • I just rolled this back so as not to invalidate an existing answer which was offered in good faith. If you have a new question then ask that in a separate question. – PolyGeo Jan 15 at 21:43
2

When the user clicks on the map, this event is fired.

the parameter e contains the clicked location.

Your code computes a new coordinate 0.0000001 degrees away from the click coordinate and save the new coordinates in a variable. It does nothing with it (at least not in the the code you have published)

MAYBE the intent is to build a square box, having the top right corner at the clicked coordinates.

  • Another potential to try would be to print console.log statements for your variables to see what is going on in your map – GISKid Jan 15 at 16:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.