How can i display title or label on polygons on google map?


I want to display the title or label on loctions on the google map,it works on markers,but not within polygons.

   

   if (CurrData.Shape == "Circle" )
{

   marker = new google.maps.Marker({
   position: CurrLatlong,
   map: gMap,
   title: CurrData.Bhname,
  label:

   {
    color: 'white',
    fontWeight: 'normal',
    text: CurrData.Bhname,
  },
  icon:

{
   path: google.maps.SymbolPath.CIRCLE,
   scale: 8.5,
   fillColor: colour,
   fillOpacity: 0.8,
   strokeWeight: 1
  },
   hover: CurrData.Bhname
  });
  }
  else

{
  marker = new google.maps.Polygon
  ({
    map: gMap,//edited by anjaly
    paths: pathShape,
   scale: 8.5,
   strokeOpacity: 0.3,
   title: CurrData.Bhname,
   label: CurrData.Bhname,
   strokeWeight: 1,
   fillColor: colour,
   fillOpacity: 0.8,
  position: CurrLatlong,
  hover: CurrData.Bhname,
});
 


Asked by:- Anjily balan
0
: 41 At:- 6/13/2019 10:05:07 AM
Javascript C# jquery








Login/Register to answer
Or
Post answer directly by entering your email-id & Name

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use