Hei Mike thank
i follow yours advice and I maked this code but this time i get all
geocoding (lat,lng) but when i trying to show just show one marke and
isn't in the right place also i get this error "did not interpret the
value of the 'top'. declaration was omitted" that happens whit
left....
u can see that in the same address
<script type='text/javascript'>
var geo = new GClientGeocoder();
var nextAddress = 0;
var delay = 100;
var marker;
var map;
function initialize() {
var lat;
map = new GMap2(document.getElementById
('mapsat'));
map.setCenter(new GLatLng(59.913820,
10.738741), 5);
map.addControl(new GMapTypeControl());
map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl());
GEvent.addListener(map, 'click', theNext);
}
var addresses = [" + Adress + @"];
function getAddress(search,next) {
geo.getLocations( search, function (result)
{
if (result.Status.code ==
G_GEO_SUCCESS) {
var p = result.Placemark
[0].Point.coordinates;
var lat=p[1];
var lng=p[0];
var g = lat + ',' + lng;
showAddress(g,map)
}
next();
});
}
function showAddress(response,map) {
var miIcono = new GIcon(G_DEFAULT_ICON);
miIcono.image = '../../images/
for_sale.png';
//alert(response)
//var point = new GLatLng(response);
var marker = new GMarker
(response,miIcono);
map.addOverlay(marker);
marker.openInfoWindowHtml
('-');
}
function theNext() {
if (nextAddress < addresses.length) {
setTimeout('getAddress(\""'+addresses
[nextAddress]+'\"",theNext)', delay);
nextAddress++;
}
}
theNext();
}
On 27 nov, 14:43, Mike Williams <[email protected]> wrote:
> There's a limit to the number of geocode requests that you're allowed to
> make per second. If there were no such limit, a handful of thoughtless
> coders could soak up all the geocode server CPU time and ruin things for
> everyone else.
>
> The easy solution is to geocode your locations once offline and store
> the coordinates in your string.
>
> --
> Mike Williamshttp://econym.org.uk/gmap
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.