如何在GMap.NET中添加svg标记?

时间:2017-06-13 11:49:46

标签: c# google-maps svg

在javascript版本中,您可以这样写:

var marker = new SVGMarker({
  map: map,
  position: new google.maps.LatLng(30.282788, -97.731457),
  icon: {
    anchor: new google.maps.Point(30, 30.26),
    size: new google.maps.Size(60,30.26),
    url: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/134893/pin-red.svg'
  }
})


var icon = {

    path: "M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0",
    fillColor: '#FF0000',
    fillOpacity: .6,
    anchor: new google.maps.Point(0,0),
    strokeWeight: 0,
    scale: 1
}

var marker = new google.maps.Marker({
    position: event.latLng,
    map: map,
    draggable: false,
    icon: icon
});

但是如何在c#中使用它?
而GMarkerGoogle类只是为构造函数Arguements提供System.Drawing.Bitmap。

1 个答案:

答案 0 :(得分:0)

GMap.Net GMapMarker的Shape属性是一个wpf UIElement