create polygon using GMSPolygon google map iOS - google-maps-sdk-ios

I want to create polygon like this polygon using native feature of google map SDK:
Is it possible?

Yes it is possible. What you need to do is create a polygon first. And then add click event to it. Then in click event function, you can move the polygon to the location where your finger is currently pointing using CGPoint.

Related

How to Draw on Google Map

I need to create a shape on the google map. If the user wants to create a shape(Polygon, Circle, Rectangle, Square) with the help of Drawer he will be able to draw shapes.
Is there any related feature of Google Maps which I can use to achieve this feature?
Thanks in advance
There is, you may try reading Drawing Manager from Google Maps Api Drawing Layer (Library)
Here is a working example of what you can achive
GoogleEx_DrawingTools

Can you customize the current location marker in react native maps?

I'd like to use a custom marker image instead of the pulsing blue dot - is there a way to customize this in react native maps using apple maps for ios and google maps for Android?
As far as I know, you cannot change the default current location dot. A work around is to pass the user's location into a <Marker /> with your custom image and turn off showsUserLocation to hide the default blue dot. Here are the Marker docs.
Then you can track the user's location using Geolocation.watchPosition. If you set the user's location to state it will trigger a rerender when the user moves.
You can create a custom marker and hook up an event listener to track the user and update the location of the marker as your user moves.
This event listener is available within the framework.
https://facebook.github.io/react-native/docs/geolocation.html#watchposition

Google Maps iOS custom UIView instead of a marker

I'm looking for a way to use a custom UIView (not just a custom image) instead of default marker provided by Google Maps iOS SDK. Basically I need a possibility to place my UIView agains proper coordinates of the map, so not necessarily to use markers as they are, just any suitable solution. Any ideas?
There is not currently a way to do this. You can view the relevent feature request (and star it, to show interest) here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=5203
The marker only shows an image. So it cannot take a CustomView. Moreover, if your custom view has some sort of button on it there is no way you can track the events from those button.
In simple words the map renders the markers as UIImage.

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.

GoogleMaps API v3 - Need help with two "click" event scenarios. Need similar functionality to v2 API

In version 2 of the API the map click event returned an Overlay, LatLng, Overlaylatlng.
I used this to create a generic map event that would either retrieve the coordinates of the Map click event, or return the coordinates of a Marker or other type of Overlay.
Now that API v3 doesn't return the Overlay or Overlaylatlng during the map click event, how can I go about creating a generic "click" event for the map that works if the user clicks on a marker or overlay? I really don't want to create a click event for each marker I have on my page as I am creating anywhere from a handful to a couple thousand markers.
Also, I had to create a custom ImageMapType in order to display the StreetViewOverlay like we could do in v2 of the API because I couldn't find anywhere that told me how to add the StreetViewOverlay without the pegman icon. How can I go about retrieving the LatLng coordinates of a click on this overlay type as well?
You will need to add a click listener to each overlay you add. You can do this in a createMarker function to reduce your code overhead.
Clicks on markers do not trigger a click event on the map at all.