public void ToXml_Is_Correct()
 {
     var symbol = new PictureMarkerSymbol();
     symbol.Name = "SuperMarket";
     symbol.Scale = 1.1;
     symbol.IconUri = "http://www.basketbalnieuws.nl/kml/supermarket.png";
     XElement xml = symbol.ToKml();
     xml.Should().HaveAttribute("id", "supermarket")
     .And.HaveElement("IconStyle");
 }
 public void ConvertToKml_With_Style_And_Definitions()
 {
     var style = new PictureMarkerSymbol();
     style.Name = "Stefania";
     style.IconUri = "http://www.basketbalnieuws.nl/kml/supermarket.png";
     style.Scale = 1.1;
     var testObject = new TestObject() { TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(52.574047699999994, 6.285734400000001), TestAsStyle = "Stefania" };
     GeoKmlConverter converter = new GeoKmlConverter();
     var xml = converter.ConvertToGeoKml<TestObject>(testObject, new List<ISymbol>() { style });
     xml.Should().Contain("#stefania");
 }
Beispiel #3
0
 public void ToKml_Is_Correct()
 {
     var symbol = new PictureMarkerSymbol();
     symbol.Name = "SuperMarket";
     symbol.Scale = 1.1;
     symbol.IconUri = "http://www.basketbalnieuws.nl/kml/supermarket.png";
     var feature = new Feature();
     feature.Description = "Mannus";
     feature.Geometry = new Point(10.1, 10.3);
     feature.Name = "Stefania";
     feature.SymbolName = "Test";
     var mapLayer = new MapLayer();
     mapLayer.Symbols.Add(symbol);
     mapLayer.Features.Add(feature);
     var result = mapLayer.ToKml();
 }