void CreateMarker(double lat, double lng, string name, int k) { GLatLng latLng = new GLatLng(lat, lng, true); GMarker marker = new GMarker(latLng); Script.Literal("{0}.k = {1};", marker, k); Script.Literal("{0}.name = {1};", marker, name); GEvent.addListener(marker, "click", delegate() { this.view.uiPlacesMultiSelector.AddItem(name, k.ToString()); }); GEvent.addListener(marker, "mouseover", delegate() { Script.Literal("stt({0});", name); }); GEvent.addListener(marker, "mouseout", delegate() { try { Script.Literal("htm();"); } catch (Exception e) { } }); this.view.uiMap.Gmap2.addOverlay(marker); markers[markers.Length] = marker; }
Marker GetMarker(double lat, double lng) { string key = lat.ToString() + "," + lng.ToString(); if (markers[key] == null) { GMarker gMarker = new GMarker(new GLatLng(lat, lng, true)); this.Gmap2.addOverlay(gMarker); Marker marker = new Marker(gMarker); markers[key] = marker; return marker; } else { return (Marker) markers[key]; } }
public Marker(GMarker gMarker) { this.gMarker = gMarker; Hover = Document.CreateElement("UL"); GEvent.addListener(gMarker, "mouseout", delegate() { try { Script.Literal("htm();"); } catch (Exception e) { } }); GEvent.addListener(gMarker, "click", delegate() { //this.view.uiPlacesMultiSelector.AddItem(name, k.ToString()); }); GEvent.addListener(gMarker, "mouseover", delegate() { Script.Literal("stt({0});", Hover.InnerHTML); }); GEvent.addListener(gMarker, "mouseout", delegate() { try { Script.Literal("htm();"); } catch (Exception e) { } }); }
internal void removeOverlay(GMarker marker) { }
internal void addOverlay(GMarker marker) { }