Xamarin.forms.googlemaps: Pin on center of map and fix it

Created on 21 May 2018  路  6Comments  路  Source: amay077/Xamarin.Forms.GoogleMaps

Hi
How can I show a pin or marker on center of map?
(User see that it fixed on center of map and show his location behind of that pin)

Most helpful comment

Yes I can show a svg pin on center of map by absolute layout.
Then get center of google maps plugin by map.VisibleRegion.center.

All 6 comments

Nobody ?!

If I correctly understand you need to place always a pin on the center of the map. From what I understood the center can be get from the camera events (map.VisibleRegion), but such events are not fired if you let the map scroll with a sort of swipe on map using your finger.
The result is a not responsive movement of your centered pin.

I suggest you, instead, to add a above drawing layer. For example I'm using SkiaSharp and it seems to be a good solution

I want user can send his location he want like telegram
telegram send location

Probably @simonemarra is correct.

Xamarin.Forms.GoogleMaps provides latitude/longitude based API only.
But @mammadkoma 's question is screen based(pixels) rendering.

Therefore, Xamarin.Forms.GoogleMaps does not provide hold pin to center of screen.

Yes I can show a svg pin on center of map by absolute layout.
Then get center of google maps plugin by map.VisibleRegion.center.

Yes I can show an SVG pin on the centre of the map by absolute layout.
Then get the centre of google maps plugin by map.VisibleRegion.center.
@mammadkoma

How you put SVG in a pin? Cause I am having a problem with that. On iOS in displays only when you go to page second time, and on Android, it crashing. Really appreciate your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JKennedy24 picture JKennedy24  路  6Comments

kitkat14 picture kitkat14  路  3Comments

ViktorBylbas picture ViktorBylbas  路  4Comments

amay077 picture amay077  路  4Comments

dreamsystems picture dreamsystems  路  5Comments