I am totally new to maps.
I am facing a problem.
The latitude and longitude values that i pass are getting assigned to NaN by a dynamically generated file when these lat/long =values are negative.
The code a-= x; b-= y is making negative lat/lon values to null and accepting (not converting) positive lat/long values. Strange.
This piece of code gets executed at
point = new GLatLng(lat, long);
where
myIcon.shadow = null;
myIcon.printShadow = null;
myIcon.iconAnchor = new GPoint(5, 15);
and i am making markers as
gmarkers.sort(function () { return 0.5 - Math.random() });
mgr.addMarkers(gmarkers.slice(0, 50), 1);
mgr.addMarkers(gmarkers.slice(51, 100), 5);
mgr.addMarkers(gmarkers.slice(101, 150), 6);
mgr.addMarkers(gmarkers.slice(151, 200), 7);
mgr.addMarkers(gmarkers.slice(201, 300), 8);
mgr.addMarkers(gmarkers.slice(301, 400), 9);
mgr.addMarkers(gmarkers.slice(401, 600), 10);
mgr.addMarkers(gmarkers.slice(601, 800), 11);
mgr.addMarkers(gmarkers.slice(801, 1100), 12);
mgr.addMarkers(gmarkers.slice(1101, 1500), 13);
mgr.addMarkers(gmarkers.slice(1501, 2000), 14);
mgr.addMarkers(gmarkers.slice(2001, 999999), 15);
mgr.refresh();
somebody please help me…thanks in advance
The issue in my case was that of data. As for Brazillian culture, the decimal in the latitude and longitude values were being set to comma (,) instead of a decimal or period (.)
this can be resolved by doing a (Globalization.CultureInfo.InvariantCulture)
to avoid replacement.
Thanks for your help.