Loading kml markers above polygon - google-maps

I am working with a google map api 3, on my map i want to generate kml markers after polygons, but it is not working, my markers are generate before polygons so i am not able to click marker.

Native Google Maps Javascript API v3 polygons will always appear on top of KML layers. If you want to control the order, use a KmlLayer to display the polygon as well, add that layer first or control the order with the zIndex property of the KmlLayers.
related question: https://stackoverflow.com/questions/35455830/kml-ordering-in-google-maps-api (including example)

Related

Drawing shapes in Here Maps and affect any markers that are within shape's boundaries

I am using the HERE Map Javascript tools and I have a map with various markers. I want users to be able to draw a shape using their mouse on the map. Any markers that are within the shape's bounds should be "touched" (i.e. updated with my prefs etc.).
I see that Google Maps users are able to do it, as in the following post: Box/Rectangle Draw Selection in Google Maps
I wonder if it's possible to do this easily using Here Maps?

How can I restrict google map from repeating in react-google-maps

I am plotting different markers on different locations on the map and then drawing polylines from markers to markers. since the map is repeating the markers are repeating as well and so the lines go in all direction in order to find the shortest path on the map.
Even if we optimize the markers, the markers won't repeat but the polylines are drawn weirdly if the markers are far apart from each other on the map.
Is there a way we can restrict map from repeating itself?
You should restrict minZoom to 1 and disable map movement on that zoom level.
Have you seen these SO answers?
Display world map with no repeats
Google Maps API V3: Bound world to fit area and disable map repeat

Getting coordinates of polygon areas defined in KML

I have displayed a google map using a KML file as source. The map has a number of polygon areas marked in it. Is there any way to get the center coordinates of each of the polygons without the click event ? I need to display an info window above each polygons when the map is displayed.
Thanks
google.maps.KmlLayer is uses tile based rendering, you can't (at least at present) access the coordinates of the polygons except on a click.
You could use:
FusionTablesLayer, import your KML into that, then query it using either a Fusion Tables API v1.0 or a google.visualization (GViz) query) for the coordinates to get their center.
example using FusionTablesLayer and GViz
A third party KML parser like geoxml3 or geoxml-v3 to render the polygons as native google.maps.Polygon objects, and get their center. This will have performance issues with complex KML.
example using geoxml3

Google Map Over Lays using KML file

I have a KML file with hundreds of lat/long points used to draw overlays on Google Maps.
Example KML file. http://www.no5w.com/OverlayON_Rev2.kml
Example displayed on a map:
http://www.no5w.com/CQxONOverlay.html
My problem is placing markers on the map. I only want to display markers on the map if they are within the overlay.
Is there any way to do this?
Thanks in advance.

Can I manipulate a KML using Google Maps API v3?

I'm loading a KML using KMLLayer in Google Maps API v3. Is it possible to reference the polygons on the map and do things like change color or transparency?
No you can't do it like that since there are no polygons like objects in a kmllayer. From the google docs:
The Maps API converts the provided geographic XML data into a KML
representation which is displayed on the map using a V3 tile overlay.
This KML looks (and somewhat behaves) like familiar V3 overlay
elements. KML and GeoRSS point elements are rendered as
markers, for example, elements are rendered as polylines
and elements are rendered as polygons. Similarly,
elements are rendered as rectangular images on the
map. Importantly, however, these objects are not Google Maps API
Markers, Polylines, Polygons or GroundOverlays; instead, they are
rendered into a single object on the map.
This page might be helpfull in exploring alternatives