Markers do not show on some user PC

Hi,

I have developed an application that uses a windows form with a panel for OSM.

For this map I have added markers. SO far everything is OK.

It works fine on my development PC running Windows 11 and also on my laptop where I use Windows 7.

But, on some user installation of this app these markers do not show up on the map.
The map itself is there but no markers.

They do not get any error message, the markers are just not there.

To me it looks like the users with this issue are missing some dlls or other needed code.

Any ideas what can be wrong here or a way to trace what causes this issue?

Here is the last part of methods I use to add markers:


                        var marker6 = new GMap.NET.WindowsForms.Markers.GMarkerGoogle(
                            new GMap.NET.PointLatLng(Convert.ToDouble(str[1]), Convert.ToDouble(str[2])),
                            GMap.NET.WindowsForms.Markers.GMarkerGoogleType.yellow_dot);
                        marker6.ToolTipText = str[0];
                        marker6.ToolTip.Fill = Brushes.Ivory;
                        marker6.ToolTip.Foreground = Brushes.Black;

                        markersOverlay6.Markers.Add(marker6);
                    }
                }
                gmap.Overlays.Add(markersOverlay6);
                double tempzoom = gmap.Zoom;
                gmap.Zoom = 4;
                gmap.Zoom = tempzoom;
                gmap.Update();
                gmap.Refresh();

Since you’re posting on an OpenStreetMap forum, you might be interested in https://switch2osm.org/

3 Likes

I found the root cause to my issues with markers not showing up on the map.

The problem was because some regional settings use comma and not dot as decimal delimitier.

Fixed with using

System.Threading.Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(“en-US”);

2 Likes