Low Activity

News

  Analyzed 10 days ago based on code collected 10 days ago.
 
Posted 6 months ago by radioman
if you want reuse the form, don't close it, hide it, or else use new form instance
Posted 6 months ago by kdoffr
I have the same Problem on VB.net (VS2010). I have a Basic form (F_Basic) with a button. If I press the button I call the form SimpleMap. At first time pressing the button it works perfect, SimpleMap is opended. Then I close SimpleMap and press the ... [More] button
in F_Basic again. The program crashes with "invalid Parameter"

Code of F_Basic:

Public Class F_Basic

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        SimpleMap.Show()
    End Sub
End Class

Code of SimpleMap:

Imports GMap.NET
Imports GMap.NET.WindowsForms

Public Class SimpleMap

    Private Sub SimpleMap_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Me.GMapControl1.MinZoom = 1
        Me.GMapControl1.MaxZoom = 17
        Me.GMapControl1.Position = New PointLatLng(48, 11)
        'Default-Zoom-Faktor
        Me.GMapControl1.Zoom = 7
        'Me.GMapControl1.Manager.Mode = AccessMode.ServerAndCache
        Me.GMapControl1.Manager.Mode = AccessMode.ServerOnly
        Me.GMapControl1.MapProvider = GMap.NET.MapProviders.BingHybridMapProvider.Instance
    End Sub
End Class

Also I have tried this code for F_Basic (but it is the same result)

Public Class F_Basic

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim f As SimpleMap
        If f Is Nothing Then
            f = New SimpleMap
        End If
        f.Owner = Me
        f.ShowDialog()
    End Sub
End Class

On Debugging I saw that it is crashing in SimpleMap at second call at line "Me.GMapControl1.MapProvider =..."

All my tries with dispose and so on does not help. Can anybody help me? [Less]
Posted 6 months ago by radioman
zero ;}
Posted 6 months ago by viniciuscordeiro
Radioman,

Did you make some progress in this feature? Would be very interesting...
Posted 6 months ago by coskunkazma
Ok, now ,I understand my problem that is I can not declare a variable its type is GMarkerGoogle, I can just declare GMapMarker, dear Radioman, you have an idea,

 

Also I have added GMarkerGoogle.cs  class to ... [More] my project (I have taken it from your demo project) ALso I still have  problem.

thanks a lot. [Less]
Posted 6 months ago by coskunkazma
your are very kind man :)

thanks
Posted 6 months ago by radioman
var mark = new GMarkerGoogle(map.Position, Properties.Resources.MyImage);
Posted 6 months ago by coskunkazma
Dear Radioman,

still I can not :(
Posted 6 months ago by radioman
if you really have no idea:

var top = new GMapOverlay();
map.Overlays.Add(top);

var marker = new GMarkerGoogle(MainMap.Position, GMarkerGoogleType.arrow);
top.Markers.Add(marker);
Posted 6 months ago by Rocksoon
Thank you very much.... :-)
 

 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.