1IdentifyPoints <-structure( function#identify points by clicking on map
2### The user can try to identify lat/lon pairs on the map by clicking on them
3(
4  MyMap, ##<< map object
5  n=1,##<< the maximum number of points to locate.
6  verbose = 0 ##<< level of verbosity
7){
8  cat("please identify ", n, "point(s) on the map with your mouse:\n")
9  ret = locator(n)
10  LatLon <- XY2LatLon(MyMap, ret$x,Y=ret$y)
11  return(LatLon)
12### the lat/lon coordinates of the chosen points are returned
13}, ex = function(){
14  #The first step naturally will be to download a static map from the Google server. A simple example:
15
16   #identifiy points:
17   #IdentifyPoints(MyMap,5)
18
19})
20