PHP Map + Location Plugin

PHP Map + Location Plugin

[ad_1]

To get this product on 50 % contact me on this link

 

LIVE PREVIEWBUY FOR $6

This is a set of location based mostly capabilities that may get a customers location based mostly on their ip deal with utilizing the IPInfoDB api, return superior particulars on a selected 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 based mostly on their IP deal with. It can return metropolis, state, nation, latitude & longitude and is correct inside a 25 mile radius. This operate accepts an IP Address and returns an array of location based mostly 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 Based Location

Country: United States
Country Code: US
State: Washington
City: Kirkland
Post Code:
Latitude: 47.6966
Longitude: -122.197

On the map

PHP Map + Location Plugin - 1

See beneath on the way to generate maps

Place Finder

This operate makes use of the Yahoo PlaceFinder API to get detailed details about a selected location. This is the best way to go if you wish to get extra detailed info or discover a extra actual location. It accepts a textual location (zip code, metropolis/state, road deal with, latitude/longitude, and so forth) and returns an array of location based mostly 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'];

Country: United States
Country Code: US
State: Washington
State Code: WA
County: King County
City: Seattle
Post Code: 98109
Cross Street: Near the intersection of Broad St and John St
House: 400
Street: Broad St
Radius: 500
Quality: 87
Where on Earth ID: 12798953
Latitude: 47.619859
Longitude: -122.348749

Google Maps

Use this to mechanically generate Google Maps for a selected location. This operate accepts numerous 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. top (choices: worth in px or %)
  • 6. zoom degree (choices: quantity between 1 and 21)
  • 7. id (choices: any legitimate css id)

Example 1 (Javascript)

The first instance makes use of javascript to generate a dynamic map. To generate a map with javascript you’ll must cross each the latitude and longitude coordinates to the placement 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 top/width could be modified by way of css). If you need to set the width & top with css as a substitute of by way of the operate, cross “css” to each the width and top parameters.

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

PHP Map + Location Plugin - 2

Google Maps (Image)

Currently the map operate in solely in a position so as to add one javascript map per web page. If 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 can set the size to something you want, however Google’s most allowed picture measurement is 630 by 630 pixels. A number of examples of various picture settings observe…

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

PHP Map + Location Plugin - 3

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

PHP Map + Location Plugin - 4

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

PHP Map + Location Plugin - 5

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

PHP Map + Location Plugin - 6

More Files From the PHP Plugin Suite


Bitly


Image Plugin


Twitter Plugin


Video Plugin


Weather Plugin

pose css

[ad_2]

To get this product on 50 % contact me on this link

 

Source

Pomento
Logo
Register New Account
Reset Password
Compare items
  • Total (0)
Compare
0
Shopping cart