Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---- MapControl.cs ----
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Google_Maps_API
- {
- public partial class MapControl : Form
- {
- public MapControl()
- {
- InitializeComponent();
- }
- private void makemap_Click(object sender, EventArgs e)
- {
- var MapWindow = new MapDisplay();
- MapWindow.Show();
- }
- }
- }
- ---- MapDisplay.cs ----
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Google_Maps_API
- {
- public partial class MapDisplay : Form
- {
- public MapDisplay(string loc, string zoom, string type)
- {
- InitializeComponent();
- String url = "https://maps.googleapis.com/maps/api/staticmap?&size=400x400¢er=Tokyo&zoom=10&maptype=satellite&key=[YOUR_KEY]";
- MapBrowser.Navigate(new Uri(url));
- }
- }
- }
Add Comment
Please, Sign In to add comment