Add labels to polygons in google maps? - google-maps

How do I put a text label on a polygon in Google Maps? Documentation deals with markers and icons, but I don't want a marker - this is not a point. ELabels was good but was made with V2 and breaks with V3.

Create an custom Overlay , you may place there any html-markup (e.g. an element that contains some text)

Related

Google Maps marker drop on building not street

I'm currently making a custom map using the Google Maps API. So far I have inserted a kml layer using geoXml3, and have written the code to determine if the location of the marker (dropped by an autocomplete address search) is contained within the kml boundary.
Unfortunately I seemed to forget that the marker drops on the street outside the building, not the building itself. This is important as the kml layer is over buildings, and doesn't bleed on to the street.
Is there a way to get the marker to drop on the building instead of the street? If not, are there any alternative ways I could complete what I'm trying to achieve?
Cheers.

Google Maps v3 block map interaction

I am trying to make a Polyline editor, just like the one from Google Drawings Library. (for specific reasons, i can't use that one)
It works on the same principle. Start with a point, then for each click add new points and make the polyline.
On the editor from Google Drawings Library, while you are editing a polyline, you're mouse can't interact with other items from the map.
Inspecting with firebug, i see that they have an overlay of 20000000 z-index inside the map.
Is there any way of creating the same overlay for my map using default Google Maps functions?
It's a custom overlay inside the overlayMouseTarget-pane with the same size as the map and a draw-method that updates the position of the overlay. You may do the same.

How the blue dot in google maps is centered at the current location?

i have several questions about the blue dot that appears when i launch the google maps in the browser. I tried implementing the same by using the blue dot image as the icon property of the marker and changing the position of the marker in accordance with the current location. So when i do this its actually like the maps are refreshing where as in the google maps application the blue dot is moving smoothly(and that's very awesome). My question
is whether blue dot in google maps is implemented as a marker which changes its
position or is it an inbuilt property of google maps which we can use.
i am using google maps API v3 to do this.
Thanks for any information.
It's a marker with custom icon which is placed with HTML 5 position provided by most recent browsers.
When the position change, you can change marker position.
http://www.kmcgraphics.com/google/

Custom style to Google Map V3 overlays

I want to draw rectangles and polygon overlays on a map, but with more style than just a color and opacity. I'd like to add dotted lines for the boundary and line patterns in the polygon itself.
Is that possible?
You can add most any style to the polylines and polygons. Take a gander at the google API documentation https://developers.google.com/maps/documentation/javascript/overlays#PolylineOptions

Google Maps: How to add numbered or lettered markers?

Is there a simple way to add numbered gmarkers onto a map? Much like how maps.google.com plots them as A-Z.
Google Maps API Icon Maker is an open source utility that has an option to create labeled markers (as well as use a custom color and size).