You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I have a few questions about working with maps!
how can I achieve centering of a marker that is being built through ItemTemplate?
GMapMarker has the property Offset which I can use as an example:
**GMapMarker marker = new GMapMarker(new PointLatLng(66.4169575018027, 94.25025752215694));
marker.PropertyChanged += Marker_PropertyChanged;
Rectangle recShape = new Rectangle
{
Width = 15,
Height = 15,
Fill = System.Windows.Media.Brushes.BlueViolet
};
marker.Shape = recShape;
marker.Offset = new Point(-recShape.Width / 2, -recShape.Height / 2);**
But how can it be used when filling through ItemTemplate? I tried to track the event PropertyChanged.
But it works if you precede Shape in the code itself, as in the example above, but it doesn’t work through ItemTemplate!
Using the example above, I set one marker with centering! but the result was not correct:
and only when you change the size of the form, the marker moves to the right place along the center
why such strange behavior?
3)I have a setting
MapControl.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
Zoom does not work in this position, although I want to bring the marker closer!How to solve this problem?
The text was updated successfully, but these errors were encountered:
Hello! I have a few questions about working with maps!
how can I achieve centering of a marker that is being built through ItemTemplate?
GMapMarker has the property Offset which I can use as an example:
But how can it be used when filling through ItemTemplate? I tried to track the event PropertyChanged.
But it works if you precede Shape in the code itself, as in the example above, but it doesn’t work through ItemTemplate!
Using the example above, I set one marker with centering! but the result was not correct:
![image](https://private-user-images.githubusercontent.com/5439578/290148509-e538362e-6665-4017-ac5f-7dbf446aa058.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjQ4MDMsIm5iZiI6MTczODk2NDUwMywicGF0aCI6Ii81NDM5NTc4LzI5MDE0ODUwOS1lNTM4MzYyZS02NjY1LTQwMTctYWM1Zi03ZGJmNDQ2YWEwNTgucG5nP1gtQW16L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duZWRIZWFkZXJzPWhvc3QifQ.gQ6vT8VZZIafwBxB47NehuyiWOz4TQU8DAlMNSc0YyE)
![image](https://camo.githubusercontent.com/c8a61d4c20bb903f867fc44d5e42e665dda2894c2f2a2e781e09323a180f1d24/68747470733a2f2f636c6970326e65742e636f6d2f636c69702f6d3232343531372f66653965322d636c69702d36356b622e6a70673f6e6f63616368653d31)
and only when you change the size of the form, the marker moves to the right place along the center
why such strange behavior?
3)I have a setting
MapControl.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
Zoom does not work in this position, although I want to bring the marker closer!How to solve this problem?
The text was updated successfully, but these errors were encountered: