This is a google map where you decide
what to do when someone clicks on it. Another way, this is an effort
to ease the development of maps and encourage their use as an
interface for web apps. That is, instead of using a text input
select box, why not a map? So, I've abstracted out
the input interface portion of the map (i.e. the grunt work)
and left a hole for specifying interesting behavior on a mouse click.
You can also type this code directly into the text box below the map and then click Set.
The long: To use this map you need to implement some behavior (as a string of
onClick) for every
mouse click. This code has the following context:
- There is a version 2 Google Map called
- There a variable of type
Jeff.Locationrepresents a locaiton with city, state, and zipcode, and has the following interface:
// Void -> String[city]If you don't undertstand this notation read HTDP, but, for example, the first one says "
// Void -> String[state]
// Void -> String[zip]
// Void -> String[description]
getCityis a function that takes no arguments and returns a String representing the city".
Yes, yes, this leaves a huge hole for cross site scripting. So, you can't use double-quotes in your code, nor can you escape at the end of a string, when passing the code via CGI. You can use these characters when simply typing into the text box below the map.
So.......... to use
- Pass that code as the value of the
onClickvariable to this page, as