jquery - `fillColor` is not working in google maps -


i trying apply fillcolor polylines this.enter image description here

but couldn't that.whats wrong here?

poly = new google.maps.polyline({           strokecolor: '#00db00',           strokeopacity: 1.0,           strokeweight: 3,           fillcolor: 'green',           fillopacity: 0.05         });         poly.setmap(map); 

fiddle:https://jsfiddle.net/vl6qpn4w/

doubt: how draw polygon using code?

polylines not support fill colors simple lines. try using polygon instead, has fill , stroke attributes - giving trying above. https://developers.google.com/maps/documentation/javascript/shapes#polygons

poly = new google.maps.polygon({       strokecolor: '#00db00',       strokeopacity: 1.0,       strokeweight: 3,       fillcolor: 'green',       fillopacity: 0.05 //increase make green background darker     });     poly.setmap(map); 

new fiddle: https://jsfiddle.net/c3znthny/1/


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -