View Issue Details

IDProjectCategoryView StatusLast Update
0002539GeoSetterImage Datapublic2023-11-05 10:39
Reporterslart Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0002539: noWrap missing results in false Longitudes

I used the modified map_google.html from Motalf posted here:
2022-12-14 10:28

This map has not a wrap activated. That results possible in false Longitudes (less than -180 or greater than 180). The geosetter don't check the values and passed the false values to exiftool. Then false values are saved. That is a problem by reading and working with this Longitude data.

Activate a noWrap in the linked map_google.html:
Line 1116
        var osm = new L.TileLayer(osmUrl, {maxZoom: 19, attribution: osmAttrib, noWrap: true}).addTo(map);

With this only tiles in the extend of -180,-90 to 180,90 are visible. But it is further possible to click outside the tiles and set false Longitude values. With the Latitude this is not possible. It needs a coordinate wrap for the Longitude.
TagsNo tags attached.



2023-10-31 05:18

reporter   ~0004809

Out of curiosity, what version of GeoSetter are you using?


2023-11-01 09:23

reporter   ~0004810

the map_google.html was for version 3.5.3 of memory
I haven't encountered any problem like that.
maybe a link problem depending on the Windows OS!?

with w7 I used and use:

same with my local leaflet maps

since then there is version 4.0.49 if don't fool me!
I can't help anymore, it's been a while since I watched


2023-11-01 09:33

reporter   ~0004811

I've never seen "noWrap: true" with leaflet! ???
I'm not an expert in leaflet maps either!

Sincerely !


2023-11-01 19:25

reporter   ~0004812

Ah, hey @Motalf !

Maybe you misunderstood it a little bit.

Geosetter 3.5.3 portable
Windows 7
Motalfs google_map.html

- start Geosetter
- zoom out to zoom:0
- the map is wrapped - is horizontal displayed in a loop.
- scroll left or right
- set a point (click)
- show the Longitude in the file table: less/greater than -180/180
That is the problem.

Disable the wrapping of the map tiles (noWrap: true):
Line 1116
        var osm = new L.TileLayer(osmUrl, {maxZoom: 19, attribution: osmAttrib, noWrap: true}).addTo(map);

But this is only a helper for not click outside -180 - 180.

Better was a Longitude wrapper, that the Longitude range is always -180 - 180.

I have no idea ot the code point to insert this Longitude wrapper:

latlon = [lat,lon];
function lon_wrapper(latlon) {
  lat = latlon[0];
  lon = latlon[1];
  lon = lon % 360;
  if (lon > 180) {
    lon = lon - 360;
  } else if (lon < -180) {
    lon = 360 + lon;
  return [lat,lon];

Have anyone an idea?


2023-11-01 20:16

reporter   ~0004813

... more infos:

maybe i have found a solution. There is a wrap() for Leaflet.
See here:

To insert this wrap() in the Motalfs map_google.html you must very high sensitive.
The wrap() must be added at all 6 latlng, but NOT on the latLng. It is also case sensitive!

There a 3 code lines/points for editing

Line 376
                setDragMarkerToPosition(e.latlng.wrap().lat, e.latlng.wrap().lng,

Line 1141
                setDragMarkerToPosition(e.latlng.wrap().lat, e.latlng.wrap().lng, false);

Lines 1145 and 1147
                    + e.latlng.wrap().lat
                    + ","
                    + e.latlng.wrap().lng;

After this edit, it is always possible to click outsite -180 - 180, but the marker are always setted inside -180 - 180. And the Longitude in the file table is also inside -180 - 180.

Consider: I have no idea if this fix all occcurences of false Longitudes.


2023-11-02 05:20

reporter   ~0004814

Thank you for the link:

Ok I see better what you are talking about

for leaflet I don't know what version they are in now!?
whether the bug has been fixed or not.

That’s beyond my skills!

it seems to me that I had set a minimum zoom of 6
I don't remember the original one anymore but it must have been close.

can be related to the GPS point to display the Map
but without certainty.

sorry I can't help you anymore!

if anyone has any leads?


2023-11-02 05:44

reporter   ~0004815

for the MinZoom on the original and on My map google.html there is none!
(maybe on version 3 or 4 that I made...) that goes back a long way!

see if in the latest version of geosetter (beta 4.0.49) you encounter this problem !?


2023-11-02 17:11

reporter   ~0004816

Version of Leaflet:
For version 3.5.3, look at the file x:\....\GeoSetter\script\leaflet.js
For version 4.0.49, do "Help| Show Map Info", the Leaflet version will be displayed

Leaflet version.jpg (77,797 bytes)
Leaflet version.jpg (77,797 bytes)


2023-11-02 22:11

reporter   ~0004817

top ! thanks !


2023-11-05 10:39

reporter   ~0004818

remember, remember ...

In the topic is the Issue linked to the topic with the issue about the Windows 7 problem with the map.

When i remember right, Friedemann don't support W7 in version 4. When it work, it's lucky.

From that stand, Motalf, Thunderboy, xyzzy and slart search for a solution for W7. The result was many map_google.html. I used the last map_google.html from motalf (linked in the topic).

Leaflet: This my issue here is not a really problem. It is a matter of the handling with the Logitude data. In the original and all other map_google.html no wrap for Longitude and wrap for Tiles is active. This is also the Leaflet default.

Leaflet feaure possibilitys to no wrap the Tiles and wrap the Longitude. Everyone can enable it.

I have modifying the last map_google.html from Motalf.
- no wrap Tiles
- wrap Longitude
- all pictures and files (leaflet.js, leaflet.css) are saved local. (with this no longer requests to

remember: it is a solution for version 3 and Windows 7.

Attached. (hope it works) (72,337 bytes)

Issue History

Date Modified Username Field Change
2023-10-30 19:46 slart New Issue
2023-10-31 05:18 xyzzy Note Added: 0004809
2023-11-01 09:23 Motalf Note Added: 0004810
2023-11-01 09:33 Motalf Note Added: 0004811
2023-11-01 19:25 slart Note Added: 0004812
2023-11-01 20:16 slart Note Added: 0004813
2023-11-02 05:20 Motalf Note Added: 0004814
2023-11-02 05:44 Motalf Note Added: 0004815
2023-11-02 17:11 xyzzy File Added: Leaflet version.jpg
2023-11-02 17:11 xyzzy Note Added: 0004816
2023-11-02 22:11 Motalf Note Added: 0004817
2023-11-05 10:39 slart File Added:
2023-11-05 10:39 slart Note Added: 0004818