Need GoogleMap api key.how to get it.

Topics: Etc...
Sep 23, 2011 at 6:50 AM
Edited Sep 23, 2011 at 7:04 AM
if i use GMapProviders.GoogleMap,the map can't show.if i use other GMapProviders like LithuaniaMap,it can show well.
GoogleMap needs GoogleMap api key.where and how can i get it?.
http://code.google.com/apis/maps/signup.html.
i find this, but it needs url for signup.is this url my IP adress?
could u help me or tell me how to use GMapProviders.GoogleMap in C# project?
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SQLite;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GMap.NET;
using GMap.NET.WindowsForms;
using GMap.NET.WindowsForms.Markers;
using GMap.NET.MapProviders;
using Microsoft.WindowsCE.Forms;

namespace MapNet
{
    public partial class Form1 : Form
    {
        private GMapControl _map;
        public Form1()
        {
            InitializeComponent();
            this.SuspendLayout();
            initMapControl();
            this.ResumeLayout(false);
        }
        private void initMapControl()  
        {
            _map = new GMapControl();  
            _map.BackColor = System.Drawing.Color.White;  
            _map.CanDragMap = true;  
            _map.Dock = System.Windows.Forms.DockStyle.Fill;  
            _map.Location = new System.Drawing.Point(0, 0);  
            _map.MapProvider = GMapProviders.GoogleMap;
            //GMapProviders.GoogleMap.APIKey = "";
            _map.MarkersEnabled = true;   
            _map.Name = "MainMap";  
            _map.RoutesEnabled = true; 
            _map.ShowTileGridLines = false; 
            _map.TabIndex = 0;
            _map.Manager.Language = LanguageType.ChineseSimplified; 
            _map.Zoom = trackBar1.Value;  
            this.panel1.Controls.Add(_map);  
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            PointLatLng current = new PointLatLng(119.276173, 26.111844);
            GMapMarkerGoogleGreen currentMark = new GMapMarkerGoogleGreen(current);
            GMapOverlay overlay = new GMapOverlay(_map, "current");  
            overlay.Markers.Add(currentMark);  
            _map.Overlays.Add(overlay); 
        } 
    }
}
Coordinator
Sep 23, 2011 at 7:12 AM
Edited Sep 23, 2011 at 7:26 AM

it has nothing to do with api key, you don't need it to display the map

Sep 23, 2011 at 7:56 AM

lol.

This is the same question i asked before.

Thx.

Maybe it's my net problem.