Problem with adding a marker, missing Shape

Topics: WPF
Nov 12, 2010 at 10:58 PM

Hello,

I have a problem with following Code. I have already download and study the demo but i could not solve this problem!

I would like to place a marker on the map with the coordinates 48.20662, 16.38282. The problem is the marker does not displayed

on the map. I work with Visual Studio 2010 and it is a WPF Projekt.

PointLatLng point1 = new PointLatLng(48.20662, 16.38282);
GMapMarker m = new GMapMarker(point1);
mGMapControl.Markers.Add(m); 

 Thanks

Nov 12, 2010 at 11:04 PM

the problem that marker is just invisible ;}

 to show something, you must assign some visual to it: var b = new Button(); b.Content = "test"; marker.Shape = b;

Nov 12, 2010 at 11:25 PM

mmm i have adding your code but there is already the same problem

PointLatLng point1 = new PointLatLng(48.20662, 16.38282); 
GMapMarker m = new GMapMarker(point1);
var b = new Button();
b.Content = "test";
m.Shape = b;
mGMapControl.Markers.Add(m); 
Nov 13, 2010 at 12:49 AM

your button is just to small to see ;} has zero width and height, try increase it "_^

Nov 13, 2010 at 8:02 AM

thanks

Nov 14, 2010 at 10:21 AM

When I change the zoom then the markers are not on the same position as before I have changed the zoom.

How can I solve this problem?

 

Nov 14, 2010 at 2:19 PM

please explain more in detail

Nov 14, 2010 at 5:06 PM

I place a marker exaktly on the corner of a feld. Now I change the zoom then the marker  is not exaktly on the corner of the field

but aside. They marker must be on the corner whatever zoom was choosen

The marker do not customize the zoom level

Do you know what i mean?

Nov 14, 2010 at 7:55 PM

ok this problem is resolved i have forgotten to implement some events