My Gmap only shows partial..

Topics: Windows Forms
Nov 24, 2012 at 3:12 PM
Edited Nov 24, 2012 at 3:13 PM

I added a gmap control to the map when I press F5 only part of the mao shows up.

Here is my code sofar.

Image 

http://www.freebords.se/map_not_cover.jpg

 

Try

                Dim es As system.Net.IPHostEntry=System.Net.Dns.GetHostEntry("www.google.com")

            Catch

                'GMap1.Manager.Mode = AccessMode.CacheOnly

                MessageBox.Show("No internet connection available, not possible to run this software.", "test", MessageBoxButtons.OK, MessageBoxIcon.Warning)

                Exit Sub

            End Try

 

 

            GMap1.MinZoom = 1

            GMap1.MaxZoom = 17

            GMap1.Zoom = 11

            GMap1.SetCurrentPositionByKeywords("Stockholm, Sweden")

 

            'Get map types

            comboBoxMapType.ValueMember = "Name"

            comboBoxMapType.DataSource = GMapProviders.List

            comboBoxMapType.SelectedItem = GMap1.MapProvider

 

            GMap1.DragButton = Windows.Forms.MouseButtons.Left

            GMap1.CanDragMap = True

 

            'Get position

            'textBoxLat.Text = gmap.Position.Lat.ToString(CultureInfo.InvariantCulture)

            'textBoxLng.Text = gmap.Position.Lng.ToString(CultureInfo.InvariantCulture)

 

             'config(gmaps)

            GMaps.Instance.UseRouteCache = True

            GMaps.Instance.UseGeocoderCache = True

            GMaps.Instance.UsePlacemarkCache = True

            GMaps.Instance.Mode = AccessMode.ServerAndCache

            GMap1.MapProvider = GMapProviders.GoogleMap

 


Coordinator
Nov 24, 2012 at 3:21 PM

set docking to full, all code in form constructor

Nov 24, 2012 at 4:33 PM

Hmmm I got a parmeter that says gmap1.dock .. tried to set dock =fill ( full not available) .. The map still is still 

partial visible ? Can you evolve a bit further ?

Nov 24, 2012 at 5:08 PM

 

GMap1.MapProvider = GMapProviders.GoogleMap 

GMap1.Dock = DockStyle.fill  

GMap1.SetCurrentPositionByKeywords("Stockholm, Sweden")         

 

Map still looks like this.. 

http://www.freebords.se/map_not_cover.jpg

Coordinator
Nov 24, 2012 at 5:15 PM

all code in form constructor

Nov 24, 2012 at 5:24 PM

Sorry I am a little bit slow.. ... -This works --cheers !

    GMap1.Dock = System.Windows.Forms.DockStyle.Fill