|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--Mapstraction
Defined in mapstraction.js
| Field Summary | |
Object |
addControlsArgs
|
Object |
api
|
Object |
currentElement
|
Object |
eventListeners
|
Object |
maps
|
Object |
markers
|
Object |
polylines
|
Object |
svn_revision_string
|
<static> Object |
HYBRID
|
<static> Object |
ROAD
|
<static> Object |
SATELLITE
|
| Constructor Summary | |
Mapstraction(<String> element,<String> api)
Mapstraction instantiates a map with some API choice into the HTML element given |
|
| Method Summary | |
void
|
addAPI(element,api)
|
void
|
addControls( args )
addControls adds controls to the map. |
void
|
addEventListener(type, func)
|
void
|
addFilter(field, operator, value)
addFilter adds a marker filter |
void
|
addGeoRSSOverlay(georssURL)
addGeoRSSOverlay adds a GeoRSS overlay to the map |
void
|
addImageOverlay(id, src,<opacity> opacity, <west> west, <south> south, <east> east, <north> north)
addImageOverlay layers an georeferenced image over the map |
void
|
addLargeControls()
addLargeControls adds a small map panning control and zoom buttons to the map Supported by: yahoo, google, openstreetmap, multimap, mapquest |
void
|
addMapTypeControls()
addMapTypeControls adds a map type control to the map (streets, aerial imagery etc) Supported by: yahoo, google, openstreetmap, multimap, mapquest |
void
|
addMarker(<Marker> marker,<old> old)
addMarker adds a marker pin to the map |
void
|
addPolyline(polyline,old)
Add a polyline to the map |
void
|
addSmallControls()
addSmallControls adds a small map panning control and zoom buttons to the map Supported by: yahoo, google, openstreetmap, openlayers, multimap, mapquest |
void
|
autoCenterAndZoom()
autoCenterAndZoom sets the center and zoom of the map to the smallest bounding box containing all markers |
void
|
clickHandler(lat,lon, me)
|
void
|
doFilter()
doFilter executes all filters added since last call |
void
|
dragging(<on> on)
dragging enable/disable dragging of the map (only implemented for yahoo and google) Supported by: yahoo, google, openstreetmap, multimap |
array
|
getAttributeExtremes(field)
getAttributeExtremes returns the minimum/maximum of "field" from all markers |
BoundingBox
|
getBounds()
getBounds gets the BoundingBox of the map |
LatLonPoint
|
getCenter()
getCenter gets the central point of the map |
Object
|
getMap()
getMap returns the native map object that mapstraction is talking to |
Object
|
getMapType()
getMapType gets the imagery type for the map. |
int
|
getZoom()
getZoom returns the zoom level of the map |
int
|
getZoomLevelForBoundingBox( bbox )
getZoomLevelForBoundingBox returns the best zoom level for bounds given |
void
|
moveendHandler(me)
|
void
|
removeAllMarkers()
removeAllMarkers removes all the Markers on a map |
void
|
removeAllPolylines()
Removes all polylines from the map |
void
|
removeMarker(<Marker> marker)
removeMarker removes a Marker from the map |
void
|
removePolyline(polyline)
Remove the polyline from the map |
void
|
resizeTo(width,height)
|
void
|
setBounds(bounds)
setBounds sets the map to the appropriate location and zoom for a given BoundingBox |
void
|
setCenter(<LatLonPoint> point)
setCenter sets the central point of the map |
void
|
setCenterAndZoom(<LatLonPoint> point, <int> zoom)
centers the map to some place and zoom level |
void
|
setImageOpacity(id, opacity)
|
void
|
setImagePosition(id)
|
void
|
setMapType(<int> type)
setMapType sets the imagery type for the map. |
void
|
setZoom(<int> zoom)
setZoom sets the zoom level for the map MS doesn't seem to do zoom=0, and Gg's sat goes closer than it's maps, and MS's sat goes closer than Y!'s TODO: Mapstraction.prototype.getZoomLevels or something. |
void
|
showRoute(route)
Show a route from MapstractionRouter on a mapstraction map Currently only supported by MapQuest |
void
|
swap(element,<String> api)
swap will change the current api on the fly |
| Field Detail |
Object addControlsArgs
Object api
Object currentElement
Object eventListeners
Object maps
Object markers
Object polylines
Object svn_revision_string
<static> Object HYBRID
<static> Object ROAD
<static> Object SATELLITE
| Constructor Detail |
Mapstraction(<String> element,<String> api)
element - The HTML element to replace with a map
api - The API to use, one of 'google', 'yahoo', 'microsoft', 'openstreetmap', 'multimap', 'map24', 'openlayers', 'mapquest'
| Method Detail |
void addAPI(element,api)
void addControls( args )
array - Which controls to switch on
void addEventListener(type, func)
void addFilter(field, operator, value)
name - of attribute to filter on
presently - only "ge" or "le"
the - value to compare against
void addGeoRSSOverlay(georssURL)
GeoRSS - feed URL
void addImageOverlay(id, src,<opacity> opacity, <west> west, <south> south, <east> east, <north> north)
opacity - 0-100
west - boundary
south - boundary
east - boundary
north - boundary
unique - DOM identifier
url - of image
void addLargeControls()
void addMapTypeControls()
void addMarker(<Marker> marker,<old> old)
marker - The marker to add
old - If true, doesn't add this marker to the markers array. Used by the "swap" method
void addPolyline(polyline,old)
void addSmallControls()
void autoCenterAndZoom()
void clickHandler(lat,lon, me)
void doFilter()
void dragging(<on> on)
on - Boolean
array getAttributeExtremes(field)
name - of "field" to query
BoundingBox getBounds()
LatLonPoint getCenter()
Object getMap()
Object getMapType()
int getZoom()
int getZoomLevelForBoundingBox( bbox )
boundingBox - the bounds to fit
void moveendHandler(me)
void removeAllMarkers()
void removeAllPolylines()
void removeMarker(<Marker> marker)
marker - The marker to remove
void removePolyline(polyline)
void resizeTo(width,height)
void setBounds(bounds)
the - bounding box you want the map to show
void setCenter(<LatLonPoint> point)
point - The point at which to center the map
void setCenterAndZoom(<LatLonPoint> point, <int> zoom)
point - Where the center of the map should be
zoom - The zoom level where 0 is all the way out.
void setImageOpacity(id, opacity)
void setImagePosition(id)
void setMapType(<int> type)
type - The (native to the map) level zoom the map to.
void setZoom(<int> zoom)
zoom - The (native to the map) level zoom the map to.
void showRoute(route)
void swap(element,<String> api)
api - The API to swap to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||