Login  |  Register
PHP3000.com  - Article Details
STATISTICS
  • Active Links: 4383
  • Pending Links: 5
  • Todays Links: 0
  • Total Articles: 4
  • Total Categories: 43
  • Sub Categories: 0

search engine - best results

Generating Static Images of Google Maps

Date Added: July 26, 2008 05:55:05 PM
Author: Quentin Zervass
Category:

One useful feature of Google Maps is the ability to generate a static image of any longitude and latitude that you desire, as opposed to using the normal JavaScript-based interactive map. In this article I will show you how to request such static images. We will then combine this technique with the geocoder we created in the article Geocoding with PHP and the Google Maps API.

Additionally, if you use Smarty you can make use of the plug-in I have included in this article as a bonus to help with generating static image requests.

There are a several restrictions you should be aware of before you get started. Firstly, the maximum dimensions of a generated map are 512 pixels high and wide. If you are really desperate to get around this restriction you could be creative in your programming and automatically request adjoining maps and join them together, however we won't be covering anything like this in this article.

The other restriction is that there is a limit of 1,000 unique image requests per day. Although your Google Maps API key is used in the request, this restriction applies to each viewer of your site, meaning it should almost never be a problem.

If you don't already have a Google Maps API key, you will need to create one for your web site for free at http://code.google.com/apis/maps/signup.html. Simply agree to the terms and conditions, and then enter your web site URL to create a key. Once created, copy the key to your editor as you will need it for the code samples in this article.

Ratings
You must be logged in to leave a rating.
Average rating: (0 votes)
Comments

No Comments Yet.


You must be logged in to leave a Comment.
ARTICLES
Rasmus Lerdorf at OSCON: Getting Rich with PHP 5
Rasmus Lerdorf gave a talk on “Getting Rich with PHP 5”. He showed techniques to dramatically improve the throughput of a web application. Click [ more ] and I’ll give you the details.
Creating A Fulltext Search Engine In PHP 5 With The Zend Framework's Zend Search Lucene
This article covers the implementation of a fulltext search engine using PHP 5 and the Zend Framework. We will be using the Zend_Search_Lucene component to create and search our fulltext index.
Monitoring File Uploads using Ajax and PHP
Because of the limitations of HTTP, it is difficult to monitor the status of files as they are uploaded via HTML forms. While other programming languages have built-in methods to monitor file uploads, PHP does not. This article shows how to implement such a solution in PHP. We will use Ajax to retrieve information about a file as it is being uploaded and display the progress back to the user.
Generating Static Images of Google Maps
One useful feature of Google Maps is the ability to generate a static image of any longitude and latitude that you desire, as opposed to using the normal JavaScript-based interactive map. In this article I will show you how to request such static images. We will then combine this technique with the geocoder we created in the article Geocoding with PHP and the Google Maps API.