|
you can try set GrayScaleMode = true, or use custom ColorMatrix
d{^__^}b - it's time to fly
|
|
|
|
|
Hi just to say I managed what I wanted by adding a draw command to the OnRender and using a partly transparent colour...
Have a nice life!!
|
|
|
|
|
Hi,
Is there any way to use "google maps zoom slider" on my map? I use form application.
Thanks
|
|
|
|
|
yes if you will create one ;}
d{^__^}b - it's time to fly
|
|
|
|
|
Dear RadioMan ,
I had another issue , I use the genius version 1.5.3.3 . when run the program , I find a delay in the program "about one second" . When I monitor the "immediate window" , I get the below data . I want only to make the control load only when the user click a button after the program loads. this is because some users do not use the map , so I do not want to make loading map delay affect them , while they do not use the map . So, Are there any property to make the control inactive or does not load.
Thanks
ZoomPropertyChanged: 0 -> 17
OnMapSizeChanged, w: 331, h: 196, size: {Width=1, Height=1}
ZoomPropertyChanged: 17 -> 0
OnMapSizeChanged, w: 150, h: 150, size: {Width=1, Height=1}
OnMapSizeChanged, w: 63, h: 99, size: {Width=1, Height=1}
ZoomPropertyChanged: 0 -> 17
TryCorrectGoogleVersions failed: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at GMap.NET.GMaps.TryCorrectGoogleVersions()
ZoomPropertyChanged: 0 -> 17
OnMapSizeChanged, w: 331, h: 196, size: {Width=1, Height=1}
ZoomPropertyChanged: 17 -> 0
OnMapSizeChanged, w: 150, h: 150, size: {Width=1, Height=1}
OnMapSizeChanged, w: 63, h: 99, size: {Width=1, Height=1}
ZoomPropertyChanged: 0 -> 17
ZoomPropertyChanged: 0 -> 17
OnMapSizeChanged, w: 331, h: 196, size: {Width=1, Height=1}
ZoomPropertyChanged: 17 -> 0
OnMapSizeChanged, w: 150, h: 150, size: {Width=1, Height=1}
OnMapSizeChanged, w: 63, h: 99, size: {Width=1, Height=1}
ZoomPropertyChanged: 0 -> 17
TryCorrectGoogleVersions, VersionGoogleMap: m@151000000
TryCorrectGoogleVersions, VersionGoogleLabels: h@151
TryCorrectGoogleVersions, VersionGoogleSatellite: 84
TryCorrectGoogleVersions, VersionGoogleTerrain: t@126,r@151
TryCorrectBingVersions, VersionBingMaps: 677
|
|
|
|
|
just leave map panel empty, and on button click event, create new or reuse existing gmap control instance and add it to that panel.
d{^__^}b - it's time to fly
|
|
|
|
|
Ok , but how to make the map control instance active/inactive .Actually , when I put the map control into the form , it always connects to the net and download data , even without making any code.
Thanks for your continuous support.
|
|
|
|
|
'inactive' = no control, you add it manually as you need it to be 'inactive', at runtime
d{^__^}b - it's time to fly
|
|
|
|
|
forgive me not to be as genius as you..
for your last replay , I guess that you mean that when I add the control to the form , the instance is created automatically and the control will connect to the internet automatically and will do tile adjustment , ... etc .
Also , I understood that to make it active , I have to add the control at run time .
I thought that there is a property like gmap.manager.datasource = serveronly/cash/serverandcash >>> It could have a property called "NONE" which means that the control have not datasource , and so , will not display any data . Am I correct ?
Can you ,please , send me simple code to describe your solution . ?
Thanks once more ....
|
|
|
|
|
Dear Radioman ,
Are there any method to display a route into the map . eg , if I have an array of Point (eg 2000 points which represents a route from location A to location B). Is it possible to display these points as a line.
Thanks,
|
|
|
|
|
what version do you use? Forms or WPF ?
d{^__^}b - it's time to fly
|
|
|
|
|
windows Form
Thanks for your instant support
|
|
|
|
|
GMapOverlay routes = new GMapOverlay(MainMap, "routes");
MainMap.Overlays.Add(routes);
...
List<PointLatLng> track = new List<PointLatLng>();
foreach(var point in session)
{
track.Add(point.Position);
}
GMapRoute gr = new GMapRoute(track, "test track");
routes.Routes.Add(gr);
d{^__^}b - it's time to fly
|
|
|
|
|
Wow , Thanks again . It is really intelligent.
One last question , but , please let me ask into another thread to make other take benefit of it .
Thanks,
|
|
|
|
|
|
check wpf demo...
d{^__^}b - it's time to fly
|
|
|
|
|
1) How to remove the red cross from the center of the map?
2) When tried to set Zoom = 100; received
System.ArgumentOutOfRangeException:
{"Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"}
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at GMap.NET.Internals.TileMatrix.GetTileWithNoLock(Int32 zoom, GPoint p)
at GMap.NET.WindowsPresentation.GMapControl.DrawMapWPF(DrawingContext g)
at GMap.NET.WindowsPresentation.GMapControl.OnRender(DrawingContext drawingContext)
at WpfApplication5.Map.OnRender(DrawingContext drawingContext) in D:\Projets\test\WpfApplication5\Map.cs:line 28
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at WpfApplication5.App.Main() in D:\Projets\test\WpfApplication5\obj\x86\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The exception was on the line
protected override void OnRender(DrawingContext drawingContext)
{
>>> base.OnRender(drawingContext);
/serhio
|
|
|
|
|
max zoom is ~17, to disable center set ShowCenter = false;
d{^__^}b - it's time to fly
|
|
|
|
|
OK, should be nice if the zoom property throws something like OutOfRangeException when the zoom exceeds the limits. Thanks for ShowCenter.
/serhio
|
|
|
|
|
I used the GMapControl in a WPF test project and it does not load any map.
It displays me a red message in each "grid cell":
Exception: The type initializer for 'SingletonCreator' threw an exception.
I observed also that your test project was signed with a key. What is the sense, and how to obtain it, (if there is needed)?
/serhio
|
|
|
|
|
|
Thank you.
I targeted framework 4, so I used the config file you provided, and it worked!
/serhio
|
|
|
|
|
the GMap.NET.GMaps.GetVilniusTransportData(Vilnus, ? for demo only ?) does not work, logging an exception:
transport_DoWork: System.Xml.XmlException: Données non valides au niveau racine(Invalid data at the root level). Ligne 1, position 1.
à System.Xml.XmlTextReaderImpl.Throw(Exception e)
à System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
à System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
à System.Xml.XmlTextReaderImpl.ParseDocumentContent()
à System.Xml.XmlTextReaderImpl.Read()
à System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
à System.Xml.XmlDocument.Load(XmlReader reader)
à System.Xml.XmlDocument.LoadXml(String xml)
à GMap.NET.GMaps.GetVilniusTransportData(TransportType type, String line, List`1 ret)
à Demo.WindowsPresentation.MainWindow.transport_DoWork(Object sender, DoWorkEventArgs e) dans C:\Documents and Settings\superUser\Mes documents\Downloads\greatmaps-db46ac6fae8b\greatmaps_db46ac6fae8b\Demo.WindowsPresentation\Windows\MainWindow.xaml.cs:ligne 356
/serhio
|
|
|
|
|
they unfortunately decided to disable that service ;/ not much can do about it
d{^__^}b - it's time to fly
|
|
|
|
|
ah, ok, thank you for your answers! : )
/serhio
|
|
|
|
|