Class MVMapView

Object
   |
   +--MVMapView

class MVMapView


MVMapView is the main entry class for all map operations inside the web browser. It defines a JavaScript map client instance that fetches and displays map tile image tiles and features of interest(FOIs) fetched from the server side, and controls map related client side user interaction.

All map content displayed by the map client is placed inside an HTML DIV element, which defines a rectangular area in the web page that displays the map. The DIV element must be defined in the same HTML page where the map client instance is created. Its size and position can be customized to meet the application's needs.

When the application script invokes appropriate MVMapView methods and other client API, map content is displayed inside the map container DIV. The map client can display 5 different types of map content: map tiles, theme-based FOI, user-defined FOI, information window and map decoration.

Besides displaying the above map content, the application can easily plug in various build-in utilities as needed. Currently supported built-in utilities include: scale bar, navigation tool bar, copyright panel, redlining tool, rectangle tool, marquee zoom tool, overview map, etc. The application can access the a built-in utility by invoking the corresponding MVMapView function. For example, method MVMapView.addScaleBar adds a scale bar to the map.

MVMapView also implements various functions that are essential for map application development. Application can use these functions to: get or change the map center and zoom level, change map client behavior by defining custom event handler for certain events, remove previously added map content, etc.



Field Summary
<static>  Object extAPITileLayerCount
          
 
Constructor Summary
MVMapView (<Object> mapDiv,<string> mapViewerBaseURL)
           
 
Method Summary
 void addCircleTool(<MVCircleTool> circleTool)
           This method adds an instance of MVCircleTool to the current map.
 void addCopyRightNote( <string> copyright )
           This method adds a copyright notice on the bottom right side of the map.
 void addCSTransformFunction(<Object> transformFunction, <int> fromSrid, <int> toSrid)
           This function registers a JavaScript function that converts coordinates specified in a coordinate system to coordinates specified in another coordinate system.
 void addDistanceTool(<MVDistanceTool> distanceTool)
           This method adds an instance of MVDistanceTool to the current map.
 void addFOI(<object> foi)
           This method adds a user-defined FOI to the current map.
 void addMapDecoration(<Object> mapdecoration)
           This method adds a MapDecoration object to the map.
 void addMapTileLayer(<object> mapTileLayer, <function> callBack)
           This method adds and displays a map tile layer to the map.
 void addNavigationPanel(<string> position, <boolean> panningButtons, <boolean> zoomingBars, <boolean> zoomingButtons, <boolean> zoomLevelBars)
           This method creates a map navigation panel and places it on the current map.
 void addOverviewMap(<Object> overviewMap)
           This function associates an overview map to the main map displayed by this MVMapView object.
 void addRectangleTool(<MVRectangleTool> rectangleTool)
           This method adds an instance of MVRectangleTool to the current map.
 void addRedLineTool(<MVRedlineTool> redlineTool)
           This method adds an instance of MVRedlineTool to the current map.
 void addScaleBar(<int> position,<int> hOffset,<int> vOffset,<boolean> transformToGeodetic)
           This method adds a scale bar in the current map.
 void addThemeBasedFOI(<Object> themeBasedFOI)
           This method adds a theme-based FOI layer to the map.
 void addToolBar(toolBar)
           This method adds an instance of MVToolbar to the current map.
 void attachEventListener(type, <string> listener)
           This method attaches an event listener function that is invoked when the specified map event occurs.
 void detachEventListener(type, <string> listener)
           This method detaches an event listener that has previously been attached to the map by attachEventListener().
 void display()
           This method initializes the map and displays the map content inside the map container (which is an HTML DIV element defined in the web page).
 void displayInfoWindow(<MVSdoGeometry> point, <string> htmlString, <int> width, <int> height, <string> style, <string> title, <Object> styleParameters)
           This method displays an information window on the map at a specified location.
 void displayTabbedInfoWindow(<MVSdoGeometry> point, <Array> tabs, <int> activeIndex, <int> width, <int> height, <Object> styleParameters)
           This method displays a tabbed information window on the map at a specified location.
 void enableDragging(<boolean> enabled)
           This method enables or disables dragging of the current map.
 void enableInfoWindowEventPropagation(<boolean> enabled)
           This method enables event propagation from the info window.
 void enableKeyboardPanning(<Boolean> enable)
           This methods enables or disables keyboard panning.
 void enableLoadingIcon(enabled)
           This methods enables or disables loading icon.
 Object enableMapBoundConstraint(enable)
           This method sets whether to enable map bound constraint.
 void enableMapWrapAround(<boolean> enable)
           This method sets whether to display the map in the wrap-around manner.
 Array getAllFOIs()
           This method gets all user-defined FOI layers in the current map.
 MVSdoGeometry getCenter()
           This method gets the center of the current map.
 MVFOI getFOI(<string> id)
           This method gets a user-defined FOI object specified by its ID.
 String getMapAsXML(<String> format, <int> width, <int> height)
           This method returns the XML map request for the current map.
 MVSdoGeometry getMapCoordinates(<Object> screenXY)
           This method converts the location specified by the screen coordinates to the cooresponding location in the map coordinate system.
 void getMapImageURL(<Function> callBack, <String> format, <int> width, <int> height)
           This method sends a map request corresponding to the current map view to the MapViewer server and gets the map image URL back from the server.
 void getMapTileLayerDefinition(<Function> callBack, <String> mapTileLayerName, <String> tileServerURL)
           This methods gets the map tile layer definition object for a given map tile layer from the map tile server.
 MVSdoGeometry getMapWindowBBox()
           This method gets the bounding box of the map window defined in map data coordinate system.
 int getMaxZoomLevel()
           This method gets the maximum zoom level of the map.
 MVSdoGeometry getMouseLocation()
           This method gets the current mouse location on the current map.
 int getOrigThemeIndex(<MVThemeBasedFOI> themeBasedFOI)
           This method gets the original display order of the theme-based FOI layer.
 Object getPixelsPerXUnit()
           This method calculate pixels per X unit
 Object getPixelsPerYUnit()
           This method calculate pixels per Y unit
 int getSrid()
           This method gets the current map spatial reference identifier (coordinate system).
 MVThemeBasedFOI getThemeBasedFOI(<String> layerName)
           This method gets a MVThemeBasedFOI object that has been added to the map.
 int getThemeIndex(<object> themeBasedFOI)
           This method gets the current display index of the theme-based FOI layer.
 int getZoomLevel()
           This method gets the current zoom level of the map.
 void pan(<int> x, <int> y)
           This methods pans the map.
 void print(<DIV> printMapDiv)
           This method generates a printable map and prints it.
 void removeAllFOIs()
           This method removes all user-defined FOIs from the current map.
 void removeFOI(<object> foiOrId)
           This method removes a user-defined FOI from the current map.
 Void removeInfoWindow()
           This method removes the currently displayed information window.
 void removeMapDecoration(<MVMapDecoration> mapdecoration)
           This method removes a map decoration from the current map.
 void removeMapTileLayer(<MVMapTileLayer> mapTileLayer)
           This method removes a map tile layer from the map.
 void removeThemeBasedFOI(<MVThemeBasedFOI> themebasedfoi)
           This method removes a theme-based FOI layer from the map.
 void setCenter( <MVSdoGeometry> mpoint, <Boolean> noSmoothPanning)
           This method sets the center of the current map.
 void setCenterAndZoomLevel(<MVSdoGeometry> center,<int> zoomLevel)
           This method sets the map center and zoom level.
 void setCenterMark(<string> img_url, <int> img_width, <int> img_height)
           This method displays an image marker at the center of the current map.
 void setDefaultFOIImageFormat(<String> format)
           This method sets the image format and background color to be used to render FOI images.
 void setDefaultInfoWindowStyle(<String> style, <Object> styleParameters)
           This methods sets the default info window style.
 void setDoubleClickAction(<String> action)
           This method will choose whether to recenter or zoomin when the user doubleclicks the mouse on map
 void setEventListener(eventType, listener)
           This method is deprecated.
 void setHomeMap(<MVSdoGeometry> center, <int> zoomlevel)
           This method sets the home map location and zoom level.
 void setLoadingIconVisible(<Boolean> visible)
           This method shows or hides the loading icon.
 void setMouseCursorStyle(<String> cursorStyle, <String> cursorType)
           This method sets the mouse cursor style when the mouse is inside the map container and not over any map content other than map tiles.
 void setThemeIndex(<MVThemeBasedFOI> themeBasedFOI, <int> index)
           This method sets the display index of the theme-based FOI layer.
 void setToOrigThemeIndex(<MVThemeBasedFOI> themeBasedFOI)
           This method sets the display index of the theme-based FOI layer to its original value.
 void setZoomAnimationEnabled(<boolean> enabledOrNot)
           This method enables or disables zoom animation.
 void setZoomLevel(<int> zoom)
           This method sets the current zoom level of the map.
 void startMarqueeZoom(<String> mode, <Object> rectStyle, <int> minRectSize)
           This method, when invoked, allows user to zoom the map by hand drawing a rectangle on the map.
 void stopMarqueeZoom()
           This method disables the marquee zoom tool.
 MVSdoGeometry transformGeom(<MVSdoGeometry> geometry, <int> toSrid, <string> mcsURL, <function> callBack, <String> dataSource)
           This method transforms the input geometry from one coordinate system to another coordinate system.
 Object wrapAroundLayer(layerwidth)
           This method calculate the map is wrap-around in curren map window
 void zoomIn(<MVSdoGeometry> center)
           This method zooms the map in by one zoom level.
 void zoomOut(<MVSdoGeometry> center)
           This method zooms the map out by one zoom level.
 void zoomToRectangle(<MVSdoGeometry> sdoRectangle)
           This method adjusts the map center and zoom level so that the rectangle area specified by an MVSdoGeometry object can best fill the map.
<static> void addMapTileLayerDefinition(definition)
           This method adds an map tile layer configuration entry to the map client.
<static> void enableCodingHints(<boolean> enabled)
           This method enables coding hints that detect potential problems and make suggestions on how to fix them.
<static> void enableTiming(<boolean> enabled)
           This method enables displaying timing measurement as alert message.
<static> void enableXMLHTTP(<Boolean> enable)
           This method sets whether to use browser built-in XMLHttpRequest/XMLHTTP objects to communicate with cross domain remote servers for map and FOI requests.
<static> void setErrorHandler(<Function> errorHandler)
           This method sets the error handler.
<static> void setProxyPath(<String> proxyPath)
           This method sets the path of the proxy server, which is relative to the application domain.

Field Detail

extAPITileLayerCount

<static> Object extAPITileLayerCount

Constructor Detail

MVMapView

MVMapView(<Object> mapDiv,<string> mapViewerBaseURL)

Method Detail

addCircleTool

void addCircleTool(<MVCircleTool> circleTool)

addCopyRightNote

void addCopyRightNote( <string> copyright )

addCSTransformFunction

void addCSTransformFunction(<Object> transformFunction, <int> fromSrid, <int> toSrid)

addDistanceTool

void addDistanceTool(<MVDistanceTool> distanceTool)

addFOI

void addFOI(<object> foi)

addMapDecoration

void addMapDecoration(<Object> mapdecoration)

addMapTileLayer

void addMapTileLayer(<object> mapTileLayer, <function> callBack)

addNavigationPanel

void addNavigationPanel(<string> position, <boolean> panningButtons, <boolean> zoomingBars, <boolean> zoomingButtons, <boolean> zoomLevelBars)

addOverviewMap

void addOverviewMap(<Object> overviewMap)

addRectangleTool

void addRectangleTool(<MVRectangleTool> rectangleTool)

addRedLineTool

void addRedLineTool(<MVRedlineTool> redlineTool)

addScaleBar

void addScaleBar(<int> position,<int> hOffset,<int> vOffset,<boolean> transformToGeodetic)

addThemeBasedFOI

void addThemeBasedFOI(<Object> themeBasedFOI)

addToolBar

void addToolBar(toolBar)

attachEventListener

void attachEventListener(type, <string> listener)

detachEventListener

void detachEventListener(type, <string> listener)

display

void display()

displayInfoWindow

void displayInfoWindow(<MVSdoGeometry> point, <string> htmlString, <int> width, <int> height, <string> style, <string> title, <Object> styleParameters)

displayTabbedInfoWindow

void displayTabbedInfoWindow(<MVSdoGeometry> point, <Array> tabs, <int> activeIndex, <int> width, <int> height, <Object> styleParameters)

enableDragging

void enableDragging(<boolean> enabled)

enableInfoWindowEventPropagation

void enableInfoWindowEventPropagation(<boolean> enabled)

enableKeyboardPanning

void enableKeyboardPanning(<Boolean> enable)

enableLoadingIcon

void enableLoadingIcon(enabled)

enableMapBoundConstraint

Object enableMapBoundConstraint(enable)

enableMapWrapAround

void enableMapWrapAround(<boolean> enable)

getAllFOIs

Array getAllFOIs()

getCenter

MVSdoGeometry getCenter()

getFOI

MVFOI getFOI(<string> id)

getMapAsXML

String getMapAsXML(<String> format, <int> width, <int> height)

getMapCoordinates

MVSdoGeometry getMapCoordinates(<Object> screenXY)

getMapImageURL

void getMapImageURL(<Function> callBack, <String> format, <int> width, <int> height)

getMapTileLayerDefinition

void getMapTileLayerDefinition(<Function> callBack, <String> mapTileLayerName, <String> tileServerURL)

getMapWindowBBox

MVSdoGeometry getMapWindowBBox()

getMaxZoomLevel

int getMaxZoomLevel()

getMouseLocation

MVSdoGeometry getMouseLocation()

getOrigThemeIndex

int getOrigThemeIndex(<MVThemeBasedFOI> themeBasedFOI)

getPixelsPerXUnit

Object getPixelsPerXUnit()

getPixelsPerYUnit

Object getPixelsPerYUnit()

getSrid

int getSrid()

getThemeBasedFOI

MVThemeBasedFOI getThemeBasedFOI(<String> layerName)

getThemeIndex

int getThemeIndex(<object> themeBasedFOI)

getZoomLevel

int getZoomLevel()

pan

void pan(<int> x, <int> y)

print

void print(<DIV> printMapDiv)

removeAllFOIs

void removeAllFOIs()

removeFOI

void removeFOI(<object> foiOrId)

removeInfoWindow

Void removeInfoWindow()

removeMapDecoration

void removeMapDecoration(<MVMapDecoration> mapdecoration)

removeMapTileLayer

void removeMapTileLayer(<MVMapTileLayer> mapTileLayer)

removeThemeBasedFOI

void removeThemeBasedFOI(<MVThemeBasedFOI> themebasedfoi)

setCenter

void setCenter( <MVSdoGeometry> mpoint, <Boolean> noSmoothPanning)

setCenterAndZoomLevel

void setCenterAndZoomLevel(<MVSdoGeometry> center,<int> zoomLevel)

setCenterMark

void setCenterMark(<string> img_url, <int> img_width, <int> img_height)

setDefaultFOIImageFormat

void setDefaultFOIImageFormat(<String> format)

setDefaultInfoWindowStyle

void setDefaultInfoWindowStyle(<String> style, <Object> styleParameters)

setDoubleClickAction

void setDoubleClickAction(<String> action)

setEventListener

void setEventListener(eventType, listener)

setHomeMap

void setHomeMap(<MVSdoGeometry> center, <int> zoomlevel)

setLoadingIconVisible

void setLoadingIconVisible(<Boolean> visible)

setMouseCursorStyle

void setMouseCursorStyle(<String> cursorStyle, <String> cursorType)