Google Map Simple Address Show (by Felice Di Stefano)
This object will create
a simple Google Map with a form to search addresses which will show on the
map, when found, highlighted by a clickable marker. The search may be defined
restricted to a specific country or worldwide.
The interface provides the necessary features to create a map with controls and
size on your taste and need.
This object is very easy
to apply and not restricted to a server support since is based only to client-side
script. The dialog provides some default values, based on the defined UK
country, to make you understand the use and make soon a test directly
from your machine and localhost server (assuming you have a Internet connection).
What you need is a Google Api Key, which you can get it here,
for each remote site you will gonna use, the default key can be
used only on your machine localhost server.
Applying
| Google Key: | Insert the Api key you have got from Google for the site address you will use the map. |
| Map Size: | Define here the size of your map in width and height. |
| Specific Country: | Specify
here the country you want to restrict the search. You may use the extended
name or the short ie: United Kingdom or UK, Italia or IT, United States
or US, etc., just care that the name is correct in english or native
language. When a country is specified there will be created 2 field for address and town, when no country is specified (worldwide) only the address field is created where to insert the complete address example: 101 My Way St, Los Angeles, CA, US note that the State or Provence in most cases is optional. |
| Pan/Zoom Control: | Add or not the required Pan/Zoom control to the map based on the map size. |
| Map Type Control: | Add or remove the buttons that determine the map type (Normal, Satellite, Hybrid) from the display. |
| Scale Control: | Add or remove the scale display of the current map zoom. |
| Overview Control: | Add or remove the collapsible overview control in the bottom-right of the map. |
| Remove Type: | Checking any of these boxes you may remove a specific map type from the row of buttons. |
| Add: | Checking any of these boxes you may add extra functionalities as Ground map type, Directions and Streetview where available. Note that directions are dependent on correct addresses. |
| Default Zoom: | Select the starting zoom of the map. |
| Save Conf: | Checking this box you allow the Save Configuration feature which applies a button on the page to give to the user the option to save the prefered zoom and map type. |
| Cookie Name: | If the Save Conf box is checked a name for the cookie to save is required. This permits to have different configurations on different pages. |
| Default map coordinates You must insert coordinates for the starting map, the default are for London UK but you may change these as required. To get coordinates is included the Google Map Get Coordinates object which creates a form to retrieve location coordinates. Once you have retrieved the coordinates insert these in the Latitude and Longitude fields. |
|
Note: Please
always check that the onLoad and onUnLoad events are inserted correctly in the
<body> tag.
You may change messages displayed in the info window, these are in the included javascript files.
by FELIXONE