예제 #1
0
		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;
		}
예제 #2
0
		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];
			}
		}
예제 #3
0
		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)
				{

				}
			});
		}
예제 #4
0
		internal void removeOverlay(GMarker marker)
		{
		}
예제 #5
0
		internal void addOverlay(GMarker marker)
		{
		}