News
IBM to offer mobile security as a service IBM will start delivering mobile security-as-a-service (MaaS) through its own cloud infrastructure in India, a move that is expected to better address in-country data requirements... IBM Spectrum Computing: IBM has enlarged its portfolio of software-defined infrastructure solutions with cognitive features for workload management.  * LiFi internet technology has been introduced, the new type of wireless internet connection that gives 100 times faster than traditional WiFi -- Invented by Professor Harald Haas from the University of Edinburgh. * Sci. Rachid Yazami has developed a smart chip that charges smartphones in less than 10 minutes. BenQ has launched BlueCore projector - Consumer electronics major BenQ has launched its first BlueCore laser light source projector. For those unaware, devices with BlueCore laser technology have a high contrast output of 80000:1 with an extended lamp life and efficiency. *** 
  Nov 8 2017 10:26AM     Pranav
  0 Comments    1338 Views  
Get Google map geo point for an any pincode by using google map Api.

Before request an Google Map API for Geo point, it is required to create a google API Key. 

Follow the below steps to create Google API Key

1) Go to the following link 
  https://developers.google.com/url-shortener/v1/getting_started#APIKey
2) Click on "GET A KEY, Select or Create a new project.




3) Now Click on "Enable API". (Sample API Key :  AIzaSyAvjD359ibDC-*****S8A73ZdTZ*****)


Now, You are ready to start developing with Google URL Shortener API.



public static string apiKey = "AIzaSyDnEtI****9i4FJIZ***";

        protected void Page_Load(object sender, EventArgs e)
        {
            string latlng = GetLatLngByPincode("600101");
        }

        public string GetLatLngByPincode(string pincode)
        {
            string locationURL = "https://maps.googleapis.com/maps/api/geocode/json?address=" + pincode + "&key=" + apiKey;
            string r = new System.Net.WebClient().DownloadString(locationURL);
            dynamic result = JObject.Parse(r);
            string latlng = result.results[0].geometry.location.lat + "," + result.results[0].geometry.location.lng;
            return latlng;
        }



Thanks, Hope this helps you to get geo points from pincode.

BackToTop
Comments



 
Search
Recent Posts
Create Amazon ElasticCache Using Memcached in CSharp
Nov 21 2017 12:09PM Posted By Amose
Get Google Map Lat Lng (Geo Point) By Pincode in C#
Nov 8 2017 10:26AM Posted By Pranav
Google URL Shortener in C#
Oct 26 2017 10:43AM Posted By Sanjay
Bind Gridview from CSV file in Asp.Net C#
Jun 18 2017 11:38PM Posted By Michael
Call WebService method from jQuery in every 1 minute
Feb 27 2017 11:51AM Posted By John
Gridview custom CSS in ASP.Net
Feb 25 2017 10:59AM Posted By Micheal Ryan
Read excel file and bind to Gridview in C#
Feb 25 2017 10:20AM Posted By Micheal
Tags
Follow us on Facebook
Follow us on Google +
Recent post in your Email inbox.
Enter your email address: