Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Readme example and image
Browse files Browse the repository at this point in the history
Example code and displayed image didn't match up, now one generates the
other.
  • Loading branch information
bensquire committed Sep 11, 2012
1 parent 2612c68 commit 191e747
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,27 @@ Using simple OO methods, this project will build the URL which can be used in an
Example Code:
-------------

include('../googlestaticmap.php');

$oSstaticMap = new GoogleStaticMap();
$oSstaticMap ->setCenter("London,UK")
->setHeight(300)
->setWidth(232)
->setZoom(8)
->setHttps(true)
->setFormat("jpg")
->setFeatureStyling(array(
"feature"=>"all",
"element"=>"all",
"style"=>array(
"saturation"=>-53,
"gamma"=>4.88,
"lightness"=>16,
"hue"=>"#1aff00"
)
));

echo '<img src="' . $oSstaticMap . '" height="' . $oSstaticMap->getHeight() . '" width="' . $oSstaticMap->getWidth() . '" />';
$oStaticMap = new GoogleStaticMap();
$oStaticMap ->setCenter("London,UK")
->setHeight(300)
->setWidth(232)
->setZoom(8)
->setFormat("jpg")
->setFeatureStyling(array(
"feature" => "all",
"element" => "all",
"style" => array(
"hue" => "#006400",
"lightness" => 50
)
));

echo '<img src="' . $oStaticMap . '" height="' . $oStaticMap->getHeight() . '" width="' . $oStaticMap->getWidth() . '" />';

Example Output:
---------------

![Sample map generated by the Class](http://maps.google.com/maps/api/staticmap?center=&zoom=10&language=en-GB&maptype=hybrid&format=png8&size=600x600&scale=1&path=weight:5|color:0x00000000|fillcolor:0xFFFF0033|51.855376,-0.576904|Wembley%2C+UK|Barnet%2C+UK&sensor=false)
![Sample map generated by the Class](http://maps.google.com/maps/api/staticmap?center=London%2CUK&zoom=8&language=en-GB&maptype=roadmap&format=jpg&size=232x300&scale=1&style=feature:all|element:all|lightness:50|hue:0x006400&sensor=false)



Expand Down

0 comments on commit 191e747

Please sign in to comment.