Subesh Pokhrel's Blog – Magento Development Tips,PHP,Google Maps
PHP & Magento Tips & Tutorials

Posts Tagged ‘ latitude ’

I am a big fan of Latitude and Longitude, as you all might know, I have other post related to Latitude and Longitude and Google Maps.
I came across one of the greatest feature of Mozilla Firefox 3.5, and that was to get the latitude and Longitude of user using simple Javascript. No API to use, No query to Google or anything. Here’s the code.

Continue reading “Get Latitude and Longitude Of User From Simple Javascript!” »

  • Share/Bookmark

I wanted to show different categories of information on one GMarker. That is I wanted to show different types of information on a Infowindow for a point on Google Maps. For that I used a tabbed info window, which helped me to show different data on each tabs. Here is the code of what I have done. I have shown the latitude and longitude of a placed clicked on the map on the tabbed info window. This is just the script part. The demo and download links are given below.

Continue reading “Tabbed Infowindow in Google Maps” »

  • Share/Bookmark

At last I found hostip.info provides a service for getting the latitude and longitude of a place on the basis of the user’s ip address. Its light weight and free, rather than downloading bulky database and getting paid services, for getting latitude and longitude on the basis of IP.
Here is the simplest way to do it. Requested to http://api.hostip.info/?ip=$ip&position=true it responds XML formatted output. So we need to parse XML code using DOM class of PHP.(#19-#23). Remember, the position=true should be set to get the latitude and longitude otherwise it will not show on default.

Here is the code and I will soon upload the working demo.

< ?php
/*
Subesh Pokhrel
subesh.com.np
Get the code for Real IP of the site from roshanbh.com.np
Mapping The IP Address to Latitude and Longitude.
*/
function IPtoLatLng($ip)
{
$latlngValue=array();
$dom = new DOMDocument();
$ipcheck = ip2long($ip);

Continue reading “Mapping The IP Address to Latitude and Longitude In Google Maps” »

  • Share/Bookmark

I have already posted similar post for finding out the latitude and longitude of a place using Google maps, but when I studied the traffic details and found out that when people visit that post, they sometime come with keywords like zipcode+latitude and longitudes, so I thought it would be better to them to post another article, giving them what they exactly want.

Continue reading “Latitude and Longitude Of a Place in Google Maps Using Zip Code” »

  • Share/Bookmark

I was so frustrated during one project where I need to find out the geological latitude and longitude of the place, with the help of Google Maps. So I googled a lot and came up with a function function (overlay,point).On calling this function on mouse click event the latitude and longitude are returned as point.lat() for latitude and point.lng() for longitude. This is the source code just the javascript part.
[UPDATE DEMO]

Continue reading “How To Get Latitude and Longitude of a Place Using Google Maps” »

  • Share/Bookmark

Search engine optimization by SEO Design Solutions