How can I restrict google map from repeating in react-google-maps - 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

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?

Google maps: Same positioned clustered markers disappear on zoom

I'm currently using the MarkerClusterer v3 library in my app to group markers inside a Google map instance.
I've found that when I have 2 markers on the same exact coordinates, the clusterer displays a group of 2 markers correctly, but when clicking on the cluster to zoom into the 2 individual markers, no markers appear. Zooming back out re-paints the "2 marker" cluster.
I'm using the default Google Maps API, adding markers to the clusterer individually inside a loop. When I disable the clusterer I can zoom into the 2 markers properly.
Any thoughts on why this may be happening?
Finally found the answer:
Marker Clusterer accepts a parameter maxZoom that controls the maximum zoom to display clusters. If this value is too high (in my case higher than the possible zoom in that area) it won't display the markers properly.
Playing around with this parameter allows for fine-tuned cluster behaviour, as you zoom into your markers.

Google Maps Draggable markers only on the given route

I'm looking for some tips to resolve that issue:
I have e.g 20 coordinates whose create a route. Next the route is drawn, and I create the two draggable markers (the route start & end).
But, how can I restrict that markers movement only along the route ? By default, I can move the markers anywhere on the map.

Loading kml markers above polygon

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)

How would I make a polygon based on the relative positions of markers in google maps?

I have a list of markers that I want to create a polygon around (showing the area around the markers and not the markers themselves). So instead of having the poly points be the direct lat/long of the markers, I want the poly to "wrap" around the markers to show the relative area around them.
Any ideas on how I could accomplish something like this?
This is called a convex hull. There's an example at http://www.geocodezip.com/v3_map-markers_ConvexHull.asp which uses the algorithm described at http://softsurfer.com/Archive/algorithm_0203/algorithm_0203.htm