I need to customize the map so if a user comes to the site from New York it will display a map of New York and if they are visiting from LA it will display a map of LA. The templatic support staff reccomended wpquestions for the place to find people who could do this. Please let me know the cost and time frame to implement this. Thank you
You can contact me at [email protected] Thx
Rashid Aliyev answers:
1) You Must Be able to look up Coordinates by IP;
2) On page load set initial coordinates of google map to coordinates of visitor gived you by IP.
The coordinates from IP will be the same as Google Map use.
Just set MAP.Latitude = IP. Latitude, Map.Logitude - IP.Longitute.
You can use ont of next:
IP TOol API - http://www.iplocationtools.com/
Or look here of how it done by PHP [[LINK href="http://www.plus2net.com/php_tutorial/php_ip.php"]]http://www.plus2net.com/php_tutorial/php_ip.php[[/LINK]] or here [[LINK href="http://blog.josemanuelperez.es/2010/07/google-maps-geolocation-directions-specific-destination/"]]http://blog.josemanuelperez.es/2010/07/google-maps-geolocation-directions-specific-destination/[[/LINK]]
Did you read my question? I am looking for someone to do it. Thanks for the answer but I need someon to do it.
Rashid Aliyev comments:
// This code demonstrates how to lookup the country, region, city,
// postal code, latitude, and longitude by IP Address.
// It is designed to work with GeoIP/GeoLite City
// Note that you must download the New Format of GeoIP City (GEO-133).
// The old format (GEO-132) will not work.
// uncomment for Shared Memory support
// $gi = geoip_open("/usr/local/share/GeoIP/GeoIPCity.dat",GEOIP_SHARED_MEMORY);
$gi = geoip_open("/usr/local/share/GeoIP/GeoIPCity.dat",GEOIP_STANDARD);
$record = geoip_record_by_addr($gi,"18.104.22.168");
print $record->country_code . " " . $record->country_code3 . " " . $record->country_name . "\n";
print $record->region . " " . $GEOIP_REGION_NAME[$record->country_code][$record->region] . "\n";
print $record->city . "\n";
print $record->postal_code . "\n";
print $record->latitude . "\n";
print $record->longitude . "\n";
print $record->metro_code . "\n";
print $record->area_code . "\n";