MapIconMaker
El MapIconMaker forma parte del GMaps Utility Library.
Consiste en crear iconos configurables. Para ello podemos utilizar tres propiedades diferentes:
- markerIconOptions
- labelMarkerIconOptions
- flatIconOptions
Una vez establecida cualquiera de estas propiedades, se sobreescribirá cualquier cosa que le hayamos hecho previamente al GIcon.
Code.aspx
<cc1:GMap ID="GMap1" runat="server" />
Code.aspx.cs
GLatLng latLng = new GLatLng(50, 10);
GMap1.setCenter(latLng, 4);
GIcon icon = new GIcon();
icon.markerIconOptions = new MarkerIconOptions(50, 50, Color.Blue);
GMarker marker = new GMarker(latLng, icon);
GInfoWindow window = new GInfoWindow(marker, "You can use the Map Icon Maker as any other marker");
GMap1.Add(window);
GIcon icon2 = new GIcon();
icon2.labeledMarkerIconOptions = new LabeledMarkerIconOptions(Color.Gold, Color.White, "A", Color.Green);
GMarker marker2 = new GMarker(latLng + new GLatLng(3, 3), icon2);
GInfoWindow window2 = new GInfoWindow(marker2, "You can use the Map Icon Maker as any other marker");
GMap1.Add(window2);
GIcon icon3 = new GIcon();
icon3.flatIconOptions = new FlatIconOptions(25, 25, Color.Red, Color.Black, "B", Color.White, 15,
FlatIconOptions.flatIconShapeEnum.roundedrect);
GMarker marker3 = new GMarker(latLng + new GLatLng(-3, -3), icon3);
GInfoWindow window3 = new GInfoWindow(marker3, "You can use the Map Icon Maker as any other marker");
GMap1.Add(window3);