PHP Map + Location Plugin Download

DOWNLOAD/LIVE PREVIEW

PHP Map + Location Plugin Download

It is a assortment of location primarily based capabilities that may get a customers location primarily based on their ip tackle utilizing the IPInfoDB api, return superior particulars on a particular location with the Yahoo PlaceFinder api, or dynamically create maps (as photos or with javascript) utilizing the Google Maps api.

IP Location

This operate interacts with the IPInfoDB.com API to get a customers location primarily based on their IP tackle. It might return metropolis, state, nation, latitude & longitude and is correct inside a 25 mile radius. This operate accepts an IP Handle and returns an array of location primarily based values.

$location = $location->ip ($_SERVER['REMOTE_ADDR']);

// Values returned
$location['country'];
$location['country_code'];
$location['state'];
$location['city'];
$location['post_code'];
$location['latitude'];
$location['longitude'];
Your IP Primarily based Location

Nation: United States
Nation Code: US
State: Washington
Metropolis: Kirkland
Publish Code:
Latitude: 47.6966
Longitude: -122.197

On the map

PHP Map + Location Plugin Download

See under on the way to generate maps

Place Finder

This operate makes use of the Yahoo PlaceFinder API to get detailed details about a particular location. That is the best way to go if you wish to get extra detailed info or discover a extra precise location. It accepts a textual location (zip code, metropolis/state, road tackle, latitude/longitude, and so forth) and returns an array of location primarily based values.

$information = $location->information ('400 Broad St Seattle, WA 98109');

// Values returned
$information['country'];
$information['country_code'];
$information['state'];
$information['state_code'];
$information['county'];
$information['city'];
$information['post_code'];
$information['cross_street'];
$information['house'];
$information['street'];
$information['radius'];
$information['quality'];
$information['woeid'];
$information['latitude'];
$information['longitude'];

Nation: United States
Nation Code: US
State: Washington
State Code: WA
County: King County
Metropolis: Seattle
Publish Code: 98109
Cross Avenue: Close to the intersection of Broad St and John St
Home: 400
Avenue: Broad St
Radius: 500
High quality: 87
The place on Earth ID: 12798953
Latitude: 47.619859
Longitude: -122.348749

Google Maps

Use this to mechanically generate Google Maps for a particular location. This operate accepts quite a few parameters:

  • 1. location (required. choices: latitude and longitude)
  • 2. format (choices: javascript, jpg, jpg-baseline, png, png32, gif))
  • 3. map sort (choices: roadmap, hybrid, satellite tv for pc, terrain)
  • 4. width (choices: worth in px or %)
  • 5. peak (choices: worth in px or %)
  • 6. zoom stage (choices: quantity between 1 and 21)
  • 7. id (choices: any legitimate css id)

Instance 1 (Javascript)

The primary instance makes use of javascript to generate a dynamic map. To generate a map with javascript you’ll have to go each the latitude and longitude coordinates to the situation parameter (the latidude and longitude could be retreived with both the ip location or place finder capabilities descriped above). The map is injected right into a div with an id of “map_canvas” by default (whose peak/width could be modified by way of css). If you wish to set the width & peak with css as a substitute of by way of the operate, go “css” to each the width and peak parameters.

$coordinates = $information['latitude'].','.$information['longitude'];
echo $location->map($coordinates, 'javascript', 'hybrid', '100%', '300px', '16', 'map_1');
Outcomes…

PHP Map + Location Plugin Download

Google Maps (Picture)

Presently the map operate in solely in a position so as to add one javascript map per web page. In the event you want a number of maps (or simply need to generate a picture as a substitute) merely set the second parameter to the kind of picture you need returned (jpg, jpg-baseline, png, png32 or gif). You’ll be able to set the scale to something you want, however Google’s most allowed picture measurement is 630 by 630 pixels. Just a few examples of various picture settings comply with…

echo $location->map($coordinates, 'png32', 'roadmap', '630px', '630px', '11', 'map_2');

PHP Map + Location Plugin Download

echo $location->map($coordinates, 'jpg', 'satellite tv for pc', '630px', '200px', '7', 'map_3');

PHP Map + Location Plugin Download

echo $location->map($coordinates, 'gif', 'terrain', '200px', '200px', '5', 'map_4');

PHP Map + Location Plugin Download

echo $location->map($coordinates, 'png', 'satellite tv for pc', '630px', '200px', '1', 'map_5');

PHP Map + Location Plugin Download

Extra Information From the PHP Plugin Suite


PHP Map + Location Plugin Download


PHP Map + Location Plugin Download


PHP Map + Location Plugin Download


PHP Map + Location Plugin Download


PHP Map + Location Plugin Download

PHP Map + Location Plugin Download

DOWNLOAD/LIVE PREVIEW
Source

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.