How can i show the area in a different color in Google Map -


i have got drop down of state , cities . upon selection of state , corresponding cities displayed , once clicked on go button , showning particular city uisng google map.

could please let me know if how posible show city in different color ?

i trying follow website , in author shows city in red color .

http://www.encodedna.com/2014/05/drawing-circles-with-google-maps-javascript-api.htm

but when tried represent same not working in fiddle

http://jsfiddle.net/4dsd7/25/

the second option see , need use polygon , how can area , because every example see area coordinates hardcoded shown here

var trianglecoords = [     new google.maps.latlng(25.774252, -80.190262),     new google.maps.latlng(18.466465, -66.118292),     new google.maps.latlng(32.321384, -64.75737),     new google.maps.latlng(25.774252, -80.190262)   ]; 

https://developers.google.com/maps/documentation/javascript/examples/polygon-simple

could please let em know how approach requirement .

you never gave div height , width properties div doesnt have dimensions, therefore map never shows. map show need set dimensions on map div

#map {     height: 600px;     width: 600px; } 

here fiddle css height , width attrs. updated fiddle include googlemaps in external resource sidebar , link https there no conflict in fiddle.

https://jsfiddle.net/4dsd7/33/


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -