| ★ wanayoo — archive 1999 http://mapsonus.switchboard.com/doc/makemap.html | Nouvelle recherche | Portail wanayoo |
Directed Map Drawing
The Maps On Us
Directed Map Drawing service lets you add
Draw Map
hyperlinks to your own Web pages.
For example, you can use the image
on your personal home page as a link
to an interactive map of your home.
You can also use any of the other images
in our link to Maps On Us gallery.
| Warning |
|---|
| We reserve the right to change this interface without notice, and/or withdraw this service altogether. |
You can create links to two types of maps: static or interactive.
Linking to an interactive map involves passing the map definition via url arguments. The result is exactly the same as if you signed onto Maps On Us as an unregistered user and asked us to draw a map.
There are three ways to create such a url: by example, by address, or by latitude and longitude.
The easiest way to create the url for a map is to use our regular site to create the map you want, and then use the "Mail It" link to mail the map to yourself. The mail will give you a url that will recreate the map as you saw it, including all named addresses on the map, labels, scale, etc. You can then use that url as the anchor for your own ``map of'' link. Anyone who clicks on that link should see exactly the same map you created.
Warning: You may be tempted to use the url that your browser displays for the map page. That may work for a short time, but eventually that url will fail. The reason is that part of the information necessary to create the map lives on our server, rather than in the url that your browser displays. To reliably recreate the map you want, you must use the url provided by the "Mail It" service.
To draw a map of an address, use the following base url:
http://SERVER-NAME/bin/maps-map/usr=~new/formName=mapsetaddrwhere SERVER-NAME is the name of this server. Add to that some or all of the following fields as ``get-mode'' arguments:
AddrHnum=house number
AddrStreet=street name
AddrXstreet=cross street name
AddrCity=city name
AddrState=state name
AddrZip=zip code
AddrPickBest=0, 1, 2, or 3
AddrStreetLine=house-number street-name
AddrCityLine=city, state zip
State or zip code are required; the other fields are optional. You must encode special characters via the normal url encoding scheme: e.g., use + for a blank, and %## for non-alphanumeric characters. If we can match that address perfectly, we'll draw a map of it. Otherwise we'll present a page with an error message and/or various alternatives, and invite the user to pick one.
If you set AddrPickBest to something other than 0, we'll be more aggressive about picking a single match for the address. In this case, if we can't find a perfect match, we'll automatically use the best match, without asking the user. Higher values mean we'll be more aggressive:
AddrPickBest=1 Use the best entry whose street name matches.
AddrPickBest=2 If we can't find the street, give a map of the city or zipcode.
AddrPickBest=3 If we can't find the city or zip, give a map of the state.
If you're getting the address from a database and all you have is a ``street address'' field that doesn't separate the house number, then you can use the AddrStreetLine field instead of AddrHnum, AddrStreet, and AddrXstreet. We recognize formats such as 123 Main St, Main St & Central Av, or just Main St. Similarly, you can use AddrCityLine instead of AddrCity, AddrState, and AddrZip.
To draw a map of a latitude & longitude, use the following url:
http://SERVER-NAME/bin/maps-map/usr=~new/mapCentScale=lng,lat[,scale]?SelectItems=-where lng and lat are the longitude and latitude as signed floating point values (negative values are West and South). The optional scale is the scale, in miles/inch. Note that when you specify the lat/long this way, you do not use any conventional get-mode arguments.
http://SERVER-NAME/bin/maps-map/usr=~new/formName=mapsetaddr
?AddrHnum=600&AddrStreet=Mountain+Ave
&AddrCity=Murray+Hill&AddrState=NJ
specifies a detailed map
via latitude & longitude.
That uses this url:
http://SERVER-NAME/bin/maps-map/usr=~new/mapCentScale=-74.40188,40.68423,.07?SelectItems=-
These maps can also have Directions To ... hyperlinks for selected places. When the reader follows one of those links, we will plan a route to the specified destination, from a starting point of the reader's choice.
In a map-drawing URL, the map is defined by a set of parameters that follow the name of the Maps On Us map-drawing command. Each parameter is of the form keyword=value, and parameters are separated by slashes (/). The map-drawing command is:
http://SERVER-NAME/bin/maps-makemapwhere SERVER-NAME is the name of this server.
While there are a lot of parameters, most have reasonable defaults, so at first you can ignore most of them. The only required parameters are:
Remember that you must escape many non-alphanumeric characters in URLs. In particular, use %20 for a blank. Note: A plus sign (+) will not work; you must encode a blank as %20.
The position specifies the place's location. We allow several formats:
The label-name gives a label to be drawn on the map. If this name is omitted or blank, we will label the map with the position specification. If this name is dash (-), we will not label the place on the map (i.e., the map will show the place, but it won't be labeled).
The goto-name gives a name to be used for a ``click for directions'' link that follows the map image. If this name is omitted or blank, we will use the label-name. If this name is dash (-), we will not create a ``directions'' link for this place.
http://SERVER-NAME/bin/maps-makemap/msize=450,400
/place=-74.16719,40.36528;Holmdel
/place=-74.40180,40.68419;Murray
/place=-74.41599,40.81833;Whippany
/place=-74.17728,40.69130;EWR;Newark%20Airport%20(EWR)
/pageTitle=Selected%20Places%20In%20NJ"
units=mi
msize=400,300
minScale=.20
color=1
ppi=70