|
|
|
Posted
about 4 hours
ago
by
radioman
GMap.NET.Core: auto set tile image proxy
|
|
Posted
about 11 hours
ago
by
shurtado
There are several errors and the project can't compile using visual studio 2008
|
|
Posted
about 14 hours
ago
by
radioman
so why it works for me? Check your threads, maybe there is more of them
|
|
Posted
about 14 hours
ago
by
radioman
check project testing/silverlight/SilverlightMapFusion.Web
you can use any map control, wpf/silverlight/javascript/etc, just enable tile host, and thats it
p.s. if your map provider isn't integrated, you can easily make your own
|
|
Posted
about 19 hours
ago
by
freeqaz
Hi all!
This method isn't working. My app is still hanging on close even after calling it. Is there something else I need to do to forcefully cancel the cache thread?
Thanks! -Free
|
|
Posted
1 day
ago
by
netsri
I am looking for Offline Maps(Free maps) to integrate into our ASP.NET MVC intranet application. Our application will be offline not connected to the internet. We have database table that holds list of Latitude and Longitudes. We would like
... [More]
to query the database table and display the points on the free map where they can do zoom in and zoom out.
We would like to add a pin for each Latitude and Longitude on the MAP programatically.
I was searching for a solution on the internet and GMap.Net and OpenStreetMap came up.
Can any one please help me how and where can i find Trinidad and Tobago maps for offline viewing and integrating into our .Net Application please.
Please help. [Less]
|
|
Posted
1 day
ago
by
olibara
Hello Radioman There is something strange with the code you propose 1- isMouseDown is always false, so I remove this test 2- I use OnMarkerEnter and OnMarkerLeave event to set the selectedMarker BUT When I click
... [More]
on a marker it automaticaly jump a few pixel up without moving the mouse ! And it is quite impossible that way to move the marker
For now I'm trying to understand that behaviour Any other suggestion ? // ******************************************************************************** // move current marker with left holding void MainMap_MouseMove(object sender, MouseEventArgs e) { if (selectedMarker == null) { return; } if (e.Button == MouseButtons.Left ) // && isMouseDown) { if (selectedMarker.IsVisible) { selectedMarker.Position = MainMap.FromLocalToLatLng(e.X, e.Y); } } } // ******************************************************************************** private void MainMap_OnMarkerEnter(GMapMarker item) { selectedMarker = item; } // ******************************************************************************** private void MainMap_OnMarkerLeave(GMapMarker item) { selectedMarker = null; } [Less]
|
|
Posted
1 day
ago
by
superware
Performance is also important, but I guess you already know that :) Any thoughts regarding the TextBlock position parallel to the route line? It might be a good idea to include this in your WPF demo.
|
|
Posted
1 day
ago
by
radioman
if it works right, it's good enough ;}
|
|
Posted
1 day
ago
by
superware
Hi, Is this the "right/best" way? How can the text be placed along the route line? Thanks, superware public class MapRuler { private GMapControl _map; private GMapMarker[]
... [More]
_anchors; private GMapMarker _route; private GMapMarker _text; private GMapMarker _currentAnchor; private PointLatLng _fixedAnchorPosition;
public MapRuler(GMapControl map, PointLatLng p, int zindex) { _anchors = new GMapMarker[2]; _route = new GMapMarker(p); for (int i = 0; i < 2; i++) { Ellipse ellipse = new Ellipse() { Width = 16, Height = 16, Fill = Brushes.Red, Stroke = Brushes.White, StrokeThickness = 3, Tag = i, }; ellipse.MouseDown += new MouseButtonEventHandler(Anchor_MouseDown); ellipse.MouseUp += new MouseButtonEventHandler(Anchor_MouseUp); GMapMarker anchor = new GMapMarker(p) { Offset = new Point(-8, -8), Shape = ellipse, ZIndex = zindex, }; _anchors[i] = anchor; _route.Route.Add(p); map.Markers.Add(anchor); zindex++; } _route.RegenerateRouteShape(map); map.Markers.Add(_route); _text = new GMapMarker(p); TextBlock textBlock = new TextBlock(); textBlock.Text = "test"; _text.Shape = textBlock; map.Markers.Add(_text); map.MouseMove += new MouseEventHandler(Map_MouseMove); _map = map; }
private void Anchor_MouseDown(object sender, MouseButtonEventArgs e) { int index = (int)((Ellipse)sender).Tag; _currentAnchor = _anchors[index]; _fixedAnchorPosition = _anchors[index == 0 ? 1 : 0].Position; } private void Anchor_MouseUp(object sender, MouseButtonEventArgs e) { _currentAnchor = null; } private void Map_MouseMove(object sender, MouseEventArgs e) { if (_currentAnchor != null) { Point point = e.GetPosition(_map); PointLatLng pointLatLng = _map.FromLocalToLatLng((int)point.X, (int)point.Y); _currentAnchor.Position = pointLatLng; _route.Position = pointLatLng; _route.Route[0] = pointLatLng; _route.Route[1] = _fixedAnchorPosition; _route.RegenerateRouteShape(_map); double distance = _map.MapProvider.Projection.GetDistance(pointLatLng, _fixedAnchorPosition); ((TextBlock)_text.Shape).Text = distance.ToString(); e.Handled = true; } }
public void Clear() { foreach (GMapMarker anchor in _anchors) { _map.Markers.Remove(anchor); anchor.Clear(); } _map.Markers.Remove(_route); _route.Clear(); _map.Markers.Remove(_text); _text.Clear(); } } [Less]
|