Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been using the Gmap API (v2) for dynamically displaying some data:

oMap.map = new GMap2(document.getElementById("map"));   
oMap.geoXml = new GGeoXml('http://darudar.org/var/files/workaroud/gmap/data.php?num=30');

I changed to v3 of the API, using the following code:

var georssLayer = new google.maps.KmlLayer('http://darudar.org/var/files/workaroud/gmap/data.php?num=30');
georssLayer.setMap(oMap.map);

Unfortunately, after the change the data markers do not show correctly or do not show at all. With v2, zooming and scaling allows a kml layer to get a BBOX array and to redraw the markers correctly. Does anyone know how to recreate this functionality with v3 of the API ?

PS: Sorry for my eng...

share|improve this question
1  
Please add a live link [url] to both your v2 and v3 maps - its much easier to de-bug using firebug. –  Mapperz Mar 15 '11 at 16:22

1 Answer 1

Works in Google Maps - it takes Google a few seconds to parse the KML and overlay it. Your script might need a time count 3-5 seconds - or will display nothing.

See it here http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fdarudar.org%2Fvar%2Ffiles%2Fworkaroud%2Fgmap%2Fdata.php%3Fnum%3D30&sll=37.0625,-95.677068&sspn=42.174768,79.013672&ie=UTF8&ll=57.231503,41.220703&spn=29.32517,79.013672&z=4

(wait 5 seconds for Google Servers to parse the kml data)

share|improve this answer
    
This not what i talk about. By default this script show only 30 markers, but this markers depend on visible area of map. In old (v2) GM API it is automatically add BBOX parameters to the url... v3 is not (or probably it do it different?) –  brutto Mar 15 '11 at 18:01
1  
v3 uses fitBounds() code.google.com/apis/maps/documentation/javascript/… –  Mapperz Mar 15 '11 at 19:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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