How to create google maps Latlng object from latitude and longitude string

Convert a string like (latitude,longitude) into a LatLng object

In previous article I explained about GME (Google Maps Engine) - An Overview, How to calculate angle of line between two points in JavaScript? , How to Show Google Map Multiple Markers Info Window in Java Script - API Google Maps and many more. 

how to Convert a string like (latitude,longitude) into a LatLng object, Google Maps API, javascript code

Here we will see how to convert string (latitude,longitude) value into a google maps LatLng object. Find the source code below:

            function CreateLatLngObject(Latitude, Longitude) {

            var latlng = new google.maps.LatLng(parseFloat(Latitude), parseFloat(Longitude));

            return latlng;


I hope this will help you.
Please leave your comments, suggestions and queries about this post in the comment sections in order for me to improve my writing skills and to showcase more useful posts. Thanks for reading .. :)

No comments:

All Rights Reserved by Etechpulse © 2015 - 2016
Powered By Blogger

Contact Form


Email *

Message *

Powered by Blogger.