who are you
------------------ Original ------------------ From: "[email protected]"<[email protected]>; Date: Fri, Jul 6, 2012 03:04 PM To: "Google Maps JavaScript API v3"<[email protected]>; Subject: [Google Maps API v3] Re: KML Layers limit to 5? On Jul 5, 11:57 pm, Gill <[email protected]> wrote: > yes i mean like this. But still I couldn't find the exact code. > > My java script code is > > (function() { > window.onload = function() { > var map = document.getElementById('map'); > var pakistan = new google.maps.LatLng(30.7311, 70.7412); > var options = { > center: pakistan, > zoom: 5, > mapTypeId: google.maps.MapTypeId.TERRAIN}; > > var map = new google.maps.Map(document.getElementById("map"), options); > > google.maps.event.addListener(map, 'click', function() { > infowindow.close(); > }); > > var mango = new google.maps.Marker({ > position: new google.maps.LatLng(31.5758, 74.3269), > map: map, > icon: > 'http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png', > title: 'Mango' > }); > var infowindow = new google.maps.InfoWindow({ > content:'Mango' > }); > google.maps.event.addListener(mango, 'click', function() { > infowindow.open(map, mango); > }); > > var places = []; > places.push(new google.maps.LatLng(30.7311, 70.7412)); > places.push(new google.maps.LatLng(29.9833, 73.2667)); > places.push(new google.maps.LatLng(24.8508, 67.0181)); > for (var i = 0; i < places.length; i++) { > var marker = new google.maps.Marker({ > position: places[i], > map: map, > icon: > 'http://gmaps-samples.googlecode.com/svn/trunk/markers/green/marker1.png', > title: 'Orange ' + i > }); > (function(i, marker) { > google.maps.event.addListener(marker, 'click', function() { > var infowindow = new google.maps.InfoWindow({ > content: 'Orange ' + i > }); > infowindow.open(map, marker);}); > })(i, marker); > > var ctaLayer = new > google.maps.KmlLayer('https://dl.dropbox.com/u/83672293/wildlife-national-parks-pakistan.km... > ctaLayer.setMap(map); > > } > } > > })(); > > I want to add three layers with check-boxes in the side bar i.e. for mango, > places and for kml layer. > > Will you please help me in writing the code for this. Did you search this group? There are lots of examples that were posted to the group. Not sure if they all still work: https://groups.google.com/group/google-maps-js-api-v3/search?group=google-maps-js-api-v3&q=toggle+KmlLayer&qt_g=Search+this+group -- Larry > > Thanks, -- 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. -- 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.
