Today, We want to share with you Integerate Google Maps To asp.net web mvc.
In this post we will show you Use Google Maps in ASP.Net, hear for google maps integration in asp.net we will give you demo and example for implement.
In this post, we will learn about working with google maps in asp.net with an example.
Integerate Google Maps To asp.net web mvc
There are the Following The simple About Integerate Google Maps To asp.net web mvc Full Information With Example and source code.
As I will cover this Post with live Working example to develop google maps integration in asp.net, so the some major files and Directory structures for this example is following below.
- Default.aspx.cs
Google maps example html
Default.aspx.cs
This is where I will make a simple HTML form and PHP server side source code for our web application. To make the forms simply all souce code copy and write it into your any text editor Like Notepad++, then save file it as Default.aspx.cs.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>use google maps in asp.net</title> <style> /* Always set the live_asp_maps height explicitly Google maps in asp.net web to define your perfect the size of the div * element that contains the live_asp_maps. */ #live_asp_maps { height: 580px; } /* Optional: Use Google Maps in ASP.Net Makes the sample page fill the window. */ html, body { height: 100%; margin: 0; padding: 0; } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script> var live_asp_maps; function google_maps_asp_net() { var mapOptions = { zoom: 9, // google maps api zoom center: new google.maps.LatLng(29.512346, 52.0758713), // Your Live latitude and longitude live_asp_maps mapTypeId: google.maps.MapTypeId.ROADMAP //declare google maps types Like TERRAIN & SATELLITE, ROADMAP }; live_asp_maps = new google.maps.Map(document.getElementById('live_asp_maps'), mapOptions); } </script> </head> <body onload="google_maps_asp_net();"> <form id="form1" runat="server"> <h1>google maps integration in asp.net</h1> <div> <div id="live_asp_maps"></div> </div> </form> </body> </html>
Google maps in asp.net web – output
Angular 6 CRUD Operations Application Tutorials
Read :
Summary
You can also read about AngularJS, ASP.NET, VueJs, PHP.
I hope you get an idea about Google Map Using Bootstrap In ASP.NET MVC.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.