On Oct 15, 6:36 am, "[email protected]" <[email protected]> wrote: > On Oct 15, 4:00 am, Vincent <[email protected]> wrote: > > > Hello, > > > I use a kml file in my google map v3. > > This works fine, but the problem is that in my kml file, there are > > 2 elements and I wonder how we can display in one by one. > > I can't find an example, and I do not understand the reference > > google API v3. > > If there was an example it would be easier ... > > It doesn't look like KmlLayer lets you access individual Placemarks in > the kml. > > You could break it into 2 separate kml files and use 2 different > kmlLayer objects to manage it. Examples of toggling individual > kmlLayer objects have been posted to the group.
Or use geoxml3: http://www.geocodezip.com/geoxml3_test/geoxml3_test_zones.html -- Larry > > > > > > > my kml file > > is:http://www.geolocalisation-anti-car-jacking.com/kmlfiles/zone2.kml > > > and my js code: > > > function initialize() { > > var latlng = new google.maps.LatLng(50.45, 4.81); > > var myOptions = { > > zoom: 6, > > center: latlng, > > mapTypeControl: true, > > mapTypeControlOptions: {style: > > google.maps.MapTypeControlStyle.DROPDOWN_MENU}, > > navigationControl: true, > > mapTypeId: google.maps.MapTypeId.ROADMAP > > } > > map = new google.maps.Map(document.getElementById("map_canvas"), > > myOptions); > > var zone2= new google.maps.KmlLayer('http://www.geolocalisation-anti- > > car-jacking.com/kmlfiles/zone2.kml, {preserveViewport: true}); > > > zone2.setMap(map); > > > Thanks, > > Vincent. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
