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;
		}
		public Controller(View view)
		{
			this.view = view;
			Gmap2 = new GMap2(view.map);

			Gmap2.addControl(new GLargeMapControl());
			double north = Number.ParseFloat(view.uiNorth.Value);
			double south = Number.ParseFloat(view.uiSouth.Value);
			double west = Number.ParseFloat(view.uiWest.Value);
			double east = Number.ParseFloat(view.uiEast.Value);
			double deltaLat = north - south;
			double delatLng = east - west;
			GLatLng ne = new GLatLng(north + deltaLat / 20, east + delatLng / 20, true);
			GLatLng sw = new GLatLng(south - deltaLat / 20, west - delatLng / 20, true);
			GLatLngBounds bounds = new GLatLngBounds(sw, ne);
			bounds.extend(sw);
			bounds.extend(ne);
			int zoom = Gmap2.getBoundsZoomLevel(bounds);
			if (zoom > 12) zoom = 12;
			GLatLng centre = new GLatLng((north + south) / 2, (east + west) / 2, true);
			Gmap2.enableScrollWheelZoom();
			Gmap2.setCenter(centre, zoom);
			Gmap2.enableContinuousZoom();
			Gmap2.enableDoubleClickZoom();
			Gmap2.enableGoogleBar();
			Gmap2.checkResize();
			
		}
Exemplo n.º 3
0
		public GMarker(GLatLng gLatLng, GMarkerOptions options)
		{
		}
Exemplo n.º 4
0
		//public static class GEvents
		//{
		//    public const string click = "click";
		//    public const string dblclick = "dblclick";
		//    public const string mousedown = "mousedown";
		//    public const string mouseup = "mouseup";
		//    public const string mouseover = "mouseover";
		//    public const string mouseout = "mouseout";
		//    public const string infowindowopen = "infowindowopen";
		//    public const string infowindowbeforeclose = "infowindowbeforeclose";
		//    public const string infowindowclose = "infowindowclose";
		//    public const string remove = "remove";
		//    public const string dragstart = "dragstart";
		//    public const string drag = "drag";
		//    public const string dragend = "dragend";
		//    public const string visibilitychanged = "visibilitychanged";
		//}
		public GMarker(GLatLng gLatLng)
		{
			
		}
Exemplo n.º 5
0
		public GLatLngBounds(GLatLng sw,  GLatLng ne)
		{
			
		}
Exemplo n.º 6
0
		public void extend(GLatLng bound)
		{
		}
Exemplo n.º 7
0
		public void panTo(GLatLng gLatLng)
		{
			
		}
Exemplo n.º 8
0
		public GPoint fromLatLngToContainerPixel(GLatLng latLng)
		{
			return null;
		}
Exemplo n.º 9
0
		public void setCenter(GLatLng latLng, int zoom)
		{
			throw new Exception("");
		}