We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Google Maps SDK

there is a package AutoFac - responsible for creating all the components of the application
there is a package Cirrious.FluentLayouts.Touch - is responsible for the automatic location (of the type of automatic display) of all displayed components
there is a package Google.Maps

this link leads to a issue with a marker - the marker is drawn higher than needed

When creating a Google Map Controller, and then when using it as a child controller, the marker is drawn incorrectly. And more specifically, then:

1) create a controller (parent)

2) this controller has a view with frame with an upper indent of 64 (any value)

`View.frame = ((0, 64), (width, height))`

3) create a controller with google maps

4) create mapview

`mapView = new MapView(new CGRect(0, 0, parentView.Frame.Width, parentView.Frame.Height))`

5) add a controller with google maps to the parent

`parentController.AddChildViewController(googleMapsViewController)`

6) add a view of google maps to the parent controller

`parentController.Add(mapView)`

`parentView.AddConstraints(mapView.FullSizeOf(parentView))`

7) inside the controller with google maps initiate display a marker

```

var mapCenter = new CGPoint(mapView.Center.X, mapView.Center.Y);

var mapCenterCoordinate = mapView.Projection.CoordinateForPoint(mapCenter);


var googleMarker = new Marker()

{

Title = "title",

Snippet = "someText",

Position = mapCenterCoordinate,

Icon = ...someImage,

Tappable = true,

Map = mapView

};

```

8) the marker is displayed incorrectly (empirically found that the readout of the Y coordinate comes from 0 and not from 64 as expected)


When creating a mapview with a frame with an upper indent of 64, the marker is drawn correctly, but then inside the map delegate the position definition is shifted along the Y axis by the same 64 points.


2 Replies

KO Konstantin April 2, 2019 05:02 PM UTC

An example application that demonstrates the unexpected behavior of the marker is prepared. Thank.


BK Bharathiraja K Syncfusion Team April 3, 2019 06:56 AM UTC

Hi Konstantin, 
 
Greetings from Syncfusion. Your query is related Xamarin Google Maps. If you would like any details from Syncfusion Xamarin Maps, please refer our online help document below here. 
 
 
Regards, 
Bharathi. 


Loader.
Live Chat Icon For mobile
Up arrow icon