Class Index

Global Variables

Classes


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.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVMapView(mapDiv, mapViewerBaseURL)
Method Summary
Method Attributes Method Name and Description
 
addCircleTool(circleTool)
This method adds an instance of MVCircleTool to the current map.
 
addCopyRightNote(copyright, options)
This method adds a copyright notice on the bottom right side of the map.
 
addCSTransformFunction(transformFunction:, fromSrid:, toSrid:)
This function registers a JavaScript function that converts coordinates specified in a coordinate system to coordinates specified in another coordinate system.
 
addDistanceTool(distanceTool)
This method adds an instance of MVDistanceTool to the current map.
 
addFOI(foi)
This method adds a user-defined FOI to the current map.
 
addFOIGroup(group)
This method adds a MVFOIGroup object to the MVMapView instance.
 
addMapDecoration(mapdecoration)
This method adds a MapDecoration object to the map.
 
addMapTileLayer(mapTileLayer, callBack)
This method adds and displays a map tile layer to the map.
<static>  
MVMapView.addMapTileLayerDefinition(definition)
This method adds an map tile layer configuration entry to the map client.
 
addNavigationPanel(position, panningButtons, zoomingBars, zoomingButtons, zoomLevelBars)
This method creates a map navigation panel and places it on the current map.
 
addOverviewMap(overviewMap)
This function associates an overview map to the main map displayed by this MVMapView object.
 
addRectangleTool(rectangleTool)
This method adds an instance of MVRectangleTool to the current map.
 
addRedLineTool(redlineTool)
This method adds an instance of MVRedlineTool to the current map.
 
addScaleBar(position, hOffset, vOffset, transformToGeodetic)
This method adds a scale bar in the current map.
 
addThemeBasedFOI(themeBasedFOI)
This method adds a theme-based FOI layer to the map.
 
addToolBar(toolbar)
This method adds an instance of MVToolbar to the current map.
 
attachEventListener(eventType, listener)
This method attaches an event listener function that is invoked when the specified map event occurs.
 
 
detachEventListener(eventType, listener)
This method detaches an event listener that has previously been attached to the map by #attachEventListener.
 
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).
 
displayInfoWindow(point, htmlString, width, height, style, title, styleParameters)
This method displays an information window on the map at a specified location.
 
displayTabbedInfoWindow(point, tabs, activeIndex, width, height, styleParameters)
This method displays a tabbed information window on the map at a specified location.
<static>  
MVMapView.enableCodingHints(enabled)
This method enables coding hints that detect potential problems and make suggestions on how to fix them.
 
enableDragging(enabled)
This method enables or disables dragging of the current map.
 
This method enables event propagation from the info window.
 
This methods enables or disables keyboard panning.
 
This methods enables or disables loading icon.
 
This method sets whether to enable map bound constraint.
 
This method sets whether to display the map in the wrap-around manner.
 
This method enables or disables mouse wheel zooming.
<static>  
MVMapView.enableTiming(enabled)
This method enables displaying timing measurement as alert message.
<static>  
MVMapView.enableXMLHTTP(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.
 
This method gets all user-defined FOI layers in the current map.
 
This method gets the center of the current map.
 
This method gets the copyright text string currently displayed on the map.
 
getFOI(id)
This method gets a user-defined FOI object specified by its ID.
 
getMapAsXML(format, width, height)
This method returns the XML map request for the current map.
 
This method gets the map tile layer configuration object.
 
This method converts the location specified by the screen coordinates to the cooresponding location in the map coordinate system.
 
getMapImageURL(callBack, format, width, 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.
 
getMapTileLayerDefinition(callBack, mapTileLayerName, tileServerURL)
This methods gets the map tile layer definition object for a given map tile layer from the map tile server.
 
This method gets all map tile layers that have been added to the map.
 
This method gets the bounding box of the map window defined in map data coordinate system.
 
This method gets the maximum zoom level of the map.
 
This method gets the current mouse location on the current map.
 
getOrigThemeIndex(themeBasedFOI)
This method gets the original display order of the theme-based FOI layer.
 
This method calculate pixels per X unit
 
This method calculate pixels per Y unit
 
This method gets the current map spatial reference identifier (coordinate system).
 
getThemeBasedFOI(layerName)
This method gets a MVThemeBasedFOI object that has been added to the map.
 
This method gets all MVThemeBasedFOI objects that have been added to the map.
 
getThemeIndex(themeBasedFOI)
This method gets the current display index of the theme-based FOI layer.
 
This method gets the current zoom level of the map.
 
origWindowOnkeydownListener(_event)
 
origWindowOnkeyupListener(_event)
 
origWindowOnmouseupListener(_event)
 
origWindowOnResizeListener(_event)
 
pan(x, y)
This methods pans the map.
 
print(printMapDiv,)
This method generates a printable map and prints it.
 
This method removes all user-defined FOIs from the current map.
 
removeFOI(foiOrId)
This method removes a user-defined FOI from the current map.
 
This method removes the currently displayed information window.
 
removeMapDecoration(mapdecoration)
This method removes a map decoration from the current map.
 
removeMapTileLayer(mapTileLayer)
This method removes a map tile layer from the map.
 
removeThemeBasedFOI(themebasedfoi)
This method removes a theme-based FOI layer from the map.
 
setCenter(mpoint, noSmoothPanning)
This method sets the center of the current map.
 
setCenterAndZoomLevel(center, zoomLevel)
This method sets the map center and zoom level.
 
setCenterMark(img_url, img_width, img_height)
This method displays an image marker at the center of the current map.
 
This method sets the image format and background color to be used to render FOI images.
 
setDefaultInfoWindowStyle(style, styleParameters)
This methods sets the default info window style.
 
This method will choose whether to recenter or zoomin when the user doubleclicks the mouse on map
<static>  
MVMapView.setErrorHandler(errorHandler)
This method sets the global error handler that is invoked when an error occurs.
 
setErrorHandler(errorHandler)
This method sets the instance specific error handler.
 
setEventListener(eventType, listener)
This method is deprecated.
 
setHomeMap(center, zoomlevel)
This method sets the home map location and zoom level.
 
This method shows or hides the loading icon.
<static>  
MVMapView.setLocale(language, country)
This method sets the Oracle Maps client locale, in which all client side error messages and into tips for built-in utilities are displayed.
 
setMouseCursorStyle(cursorStyle, 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.
<static>  
MVMapView.setProxyPath(proxyPath)
This method sets the path of the proxy server, which is relative to the application domain.
 
setThemeIndex(themeBasedFOI, index)
This method sets the display index of the theme-based FOI layer.
 
setToOrigThemeIndex(themeBasedFOI)
This method sets the display index of the theme-based FOI layer to its original value.
<static>  
MVMapView.setUtilImgURL(url)
This method sets the base URL of the UI utility images.
 
This method enables or disables zoom animation.
 
This method sets the current zoom level of the map.
 
startMarqueeZoom(mode, rectStyle, minRectSize)
This method, when invoked, allows user to zoom the map by hand drawing a rectangle on the map.
 
This method disables the marquee zoom tool.
 
transformGeom(geometry, toSrid, mcsURL, callBack, dataSource)
This method transforms the input geometry from one coordinate system to another coordinate system.
 
wrapAroundLayer(layerwidth)
This method calculate the map is wrap-around in curren map window
 
zoomIn(center)
This method zooms the map in by one zoom level.
 
zoomOut(center)
This method zooms the map out by one zoom level.
 
zoomToRectangle(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.
Class Detail
MVMapView(mapDiv, mapViewerBaseURL)
Parameters:
{Object} mapDiv
the HTML DIV element where all map content is displayed.
{string} mapViewerBaseURL
the base URL of the MapViewer server from which the map client fetches map tiles and FOI data. The typical MapViewer base URL is http://hostname:port/mapviewer.
Method Detail
{void} addCircleTool(circleTool)
This method adds an instance of MVCircleTool to the current map. An MVCircleTool object defines a circle tool that the user can use to draw a circle on the map by mouse clicking and dragging.
Parameters:
{MVCircleTool} circleTool
an instance of MVCircleTool to be added to the map.
Returns:
None
Requires:
MVCircleTool
See:
MVCircleTool

{void} addCopyRightNote(copyright, options)
This method adds a copyright notice on the bottom right side of the map. By default, the copyright node is displayed at the lower-right corner of the map. You can customize its positioning and/or styling by specifying an options object when invoking this method.

The options object can have the following attributes:

You can also specify the font type, color and size of the copyright note by defining your own CSS style. The CSS style must be named .MV_COPYRIGHT. Here is an example.

 <style type="text/css">
   .MV_COPYRIGHT{
      font-family: Arial; 
      font-weight:bold;
      color: #FF0000;
   }
 </style>
Parameters:
{string} copyright
a string to be displayed as the copyright notice.
{Object} options
an object that specifies positioning and/or styling parameters.
Returns:
None

addCSTransformFunction(transformFunction:, fromSrid:, toSrid:)
This function registers a JavaScript function that converts coordinates specified in a coordinate system to coordinates specified in another coordinate system. The registered coordinate transformation function is called whenever such coordinate system transformation is needed. For example, when the application invokes MVMapView.transformGeom or the application specifies the map center in a coordinate system that is different from the map tile layer coordinate system. called
Parameters:
{Object} transformFunction:
the function used to transform the coordinates. This function takes the X and Y coordinates as the input parameters and returns an object that specifies the result coordinates as attributes x and y.
{int} fromSrid:
the Srid of the coordinate system from which the tranformation function transforms the coordinates.
{int} toSrid:
the Srid of the coordinate system into which the tranformation function transforms the coordinates.

{void} addDistanceTool(distanceTool)
This method adds an instance of MVDistanceTool to the current map. An MVDistanceTool object defines a distance tool that the user can use to get the distance between points on the map by mouse clicking.
Parameters:
{MVDistanceTool} distanceTool
an instance of MVDistanceTool to be added to the map.
Returns:
None
Requires:
MVDistanceTool
See:
MVDistanceTool

{void} addFOI(foi)
This method adds a user-defined FOI to the current map.
Parameters:
{object} foi
FOI object that specifies the user-defined FOI to be added to the map.
Returns:
None

{void} addFOIGroup(group)
This method adds a MVFOIGroup object to the MVMapView instance. All user defined FOI(MVFOI) objects that belong to the MVFOIGroup object will be added and displayed on the map.
Parameters:
{Object} group
a FOI group object
Returns:
None

{void} addMapDecoration(mapdecoration)
This method adds a MapDecoration object to the map. A map decoration is a piece of user supplied HTML content (such as a map title string or a custom built control bar) that can be displayed on top of the map. Once added, a map decoration will not move with the map when the map is recentered.

The map decoration can be set to collapsible so that it can be minimized when the user clicks on the minimization button. By default, a map decoration is not collapsible.

The map decoration can be set to be draggable so that the user can move the map decoration inside the map window by dragging it using mouse.

Parameters:
{Object} mapdecoration
a MapDecoration object to be displayed on the map
Returns:
None

{void} addMapTileLayer(mapTileLayer, callBack)
This method adds and displays a map tile layer to the map.

If the map tile layer is defined on the server(not a MVCustomMapTileLayer object), the map client will automatically fetch the map tile layer definition by sending a request to the map tile server.

Parameters:
{object} mapTileLayer
a MVMapTileLayer, MVCustomMapTileLayer, MVGoogleTileLayer, MVVirtualEarthTileLayer or MVYahooTileLayer object.
{function} callBack
the call back function that is execuated after the map tile layer configuration is fetched from the server and the map tile layer is added.
Returns:
None

<static> MVMapView.addMapTileLayerDefinition(definition)
This method adds an map tile layer configuration entry to the map client. The map configuration entry is specified by a javascript map configuration object. It contains information needed by the map client to assemble and display map tiles. It defines map tile layer name, map coordinate system, zoom levels and tiling rules, etc.

If the map tile layer configuration is added to the map client using this method, the same map tile layer configuration will not be fetched from the server. In other words, using this method, the application can overwrite the map tile layer configuration defined on the server side.

Here is an example.

   var mapConfig = {
         mapTileLayer:"custom_map",
         format:"PNG",
         coordSys:{srid:8307,type:"GEODETIC",distConvFactor:0.0,
                   minX:-180.0,minY:-90.0,maxX:180.0,maxY:90.0},
         zoomLevels:
         [
          {zoomLevel:0,name:"level0", 
           tileWidth:61.14411263390067, tileHeight:61.14411263390067,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:1,name:"level1",
           tileWidth:30.572056316950334,tileHeight:30.572056316950334,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:2,name:"level2",
           tileWidth:15.286028158107968,tileHeight:15.286028158107968,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:3,name:"level3",
           tileWidth:4.961746909541633,
           tileHeight:4.961746909541633,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:4,name:"level4",
           tileWidth:1.6105512127664132,tileHeight:1.6105512127664132,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:5,name:"level5",
           tileWidth:0.5227742142726501,tileHeight:0.5227742142726501,
           tileImageWidth:256,tileImageHeight:256},
          {zoomLevel:6,name:"level6",
           tileWidth:0.16968897570090388,tileHeight:0.16968897570090388,
           tileImageWidth:256,tileImageHeight:256},
         ]
       }; 
     
  
Parameters:
definition

{void} addNavigationPanel(position, panningButtons, zoomingBars, zoomingButtons, zoomLevelBars)
This method creates a map navigation panel and places it on the current map. The default navigation panel has a zoom level bar that can be dragged to change map zoom level and 8-direction panning buttons.

You can also add the navigation panel by creating a MVNavigationPanel object and adding it to a MVMapDecoration object, which has more control options.

Parameters:
{string} position
that specifies the position of the navigation bar on the map. If its value is west (the default), the navigation panel is placed in the upper left side of the map. If its value is east, the navigation panel is placed in the upper right side of the map.
{boolean} panningButtons
a boolean that specifies whether to add the panning buttons to the navigation panel.
{boolean} zoomingBars
a boolean that specifies whether to add the zooming bar to the navigation panel.
{boolean} zoomingButtons
a boolean that specifies whether to add the zooming buttons(+/-) to the navigation panel.
{boolean} zoomLevelBars
a boolean that specifies whether to add the zoom level bars to the navigation panel.
Returns:
None

{void} addOverviewMap(overviewMap)
This function associates an overview map to the main map displayed by this MVMapView object. The overview map is defined in a MVOverviewMap object. The application can customize its size and positioning.
Parameters:
{Object} overviewMap
the MVOverviewMap instance that defines an overview map.
Returns:
None.

{void} addRectangleTool(rectangleTool)
This method adds an instance of MVRectangleTool to the current map. An MVRectangleTool object defines a rectangle tool that the user can use to draw a rectangle on the map by mouse clicking and dragging.
Parameters:
{MVRectangleTool} rectangleTool
an instance of MVRectangleTool to be added to the map.
Returns:
None
Requires:
MVRectangleTool
See:
MVRectangleTool

{void} addRedLineTool(redlineTool)
This method adds an instance of MVRedlineTool to the current map. An MVRedlineTool object defines a redline tool that the user can use to draw a polyline on the map by mouse clicking.
Parameters:
{MVRedlineTool} redlineTool
an instance of MVRedlineTool to be added to the map.
Returns:
None
Requires:
MVRedlineTool
See:
MVRedlineTool

{void} addScaleBar(position, hOffset, vOffset, transformToGeodetic)
This method adds a scale bar in the current map. The scale bar can be placed at one of the four corners of the map. For map images rendered in geodetic systems, the scale bar is calculated using the Earth (sphere) surface distances. For map images rendered in projected systems, by default the scale bar is calculated using the Cartesian distances in the projected system. For better accuracy, user can also tell the map client to calculate sphere surface distances by converting projected coordinates to geodetic coordinates.

You can also add the scale bar by creating a MVScaleBar object and adding it to a MVMapDecoration object, which has more control options.

Parameters:
{int} position
An integer between 1-4 that specifies the scale bar position, which can be one of the four corners: 1 - Upper-right; 2 - Lower-left; 3 - Lower-right; 4 - Upper-left.
{int} hOffset
An integer that specifies the horizontal offset of the scale bar relative to the right or left border of the map. If the scale bar is placed on the right side of the map, hOffset specifies the offset relative to the right border. If the scale bar is placed on the left side of the map, hOffset specifies the offset relative to the left border.
{int} vOffset
An integer that specifies the vertical offset of the scale bar relative to the upper or lower border of the map. If the scale bar is placed on the upper side of the map, vOffset specifies the offset relative to the upper border. If the scale bar is placed on the lower side of the map, vOffset specifies the offset relative to the lower border.
{boolean} transformToGeodetic
optional, this parameter tells the map client whether to convert the projected coordinates to geodetic coordinates and calculate the scale bar using sphere surface distances. This parameter should be used only for map images rendered in projected systems.
Returns:
None

{void} addThemeBasedFOI(themeBasedFOI)
This method adds a theme-based FOI layer to the map. A theme refers to a spatial layer in the database.
Parameters:
{Object} themeBasedFOI
an MVThemeBasedFOI object that defines the theme-based FOI layer.
Returns:
None

{void} addToolBar(toolbar)
This method adds an instance of MVToolbar to the current map. An MVToolBar instance defines a draggable toolbar instance as a container of some built-in tool or customer tools.
Parameters:
{MVToolBar} toolbar
an instance of MVToolBar to be added to the map.
Returns:
None
Requires:
MVToolBar
See:
MVToolBar

{void} attachEventListener(eventType, listener)
This method attaches an event listener function that is invoked when the specified map event occurs. The event can be of the following types: MVEvent.RECENTER, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_DOUBLE_CLICK, MVEvent.ZOOM_LEVEL_CHANGE, MVEvent.BEFORE_ZOOM_LEVEL_CHANGE and MVEvent.INITIALIZE.
Parameters:
{string} eventType
one of the following string values identifying the type of event listener: MVEvent.RECENTER, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_DOUBLE_CLICK, MVEvent.ZOOM_LEVEL_CHANGE, MVEvent.BEFORE_ZOOM_LEVEL_CHANGE and MVEvent.INITIALIZE.
{string} listener
specifying the listener function.
Returns:
None

checkLayersAndSetLoadingIcon()

{void} detachEventListener(eventType, listener)
This method detaches an event listener that has previously been attached to the map by #attachEventListener.
Parameters:
{string} eventType
one of the following string values identifying the type of event listener: MVEvent.RECENTER, MVEvent.MOUSE_CLICK, MVEvent.MOUSE_RIGHT_CLICK, MVEvent.MOUSE_DOUBLE_CLICK, MVEvent.ZOOM_LEVEL_CHANGE, MVEvent.BEFORE_ZOOM_LEVEL_CHANGE and MVEvent.INITIALIZE.
{string} listener
specifying the listener function.
Returns:
None

{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). This method should only be called when the map is displayed for the first time or needs to be reloaded.
Returns:
None

{void} displayInfoWindow(point, htmlString, width, height, style, title, styleParameters)
This method displays an information window on the map at a specified location. The content of the information window is defined by an HTML string. The application user can close the information window by clicking the close ("X") button inside the window.
Parameters:
{MVSdoGeometry} point
a point MVSdoGeometry object that specifies the location of the info window on the map, which is defined in the map coordinate system. If the width and height are omitted, the info window will automatically sized to best fit the content.
{string} htmlString
an HTML content string to be displayed inside the information window.
{int} width
the width of the information window in pixels.
{int} height
the height of the information window in pixels.
{string} style
an optional String parameter that specifies the information window style. The possible values are "InfoWindowStyle1" or "InfoWindowStyle2". By default, all information windows are displayed using "InfoWindowStyle1".
{string} title
an optional String parameter that specifies the info window title string.
{Object} styleParameters
the object that specifies the custom style parameters, which are effective only when the info window style is "MVInfoWindowStyle1".
Returns:
None

{void} displayTabbedInfoWindow(point, tabs, activeIndex, width, height, styleParameters)
This method displays a tabbed information window on the map at a specified location. The content of the information window is defined by an HTML string. The application user can close the information window by clicking the close ("X") button inside the window.
Parameters:
{MVSdoGeometry} point
a point MVSdoGeometry object that specifies the location of the info window on the map, which is defined in the map coordinate system. If the width and height are omitted, the info window will automatically sized to best fit the content.
{Array} tabs
a MVInfoWindowTab array that specifies each tab's title and content.
{int} activeIndex
It indicates which tab is active. The default value is 0.
{int} width
the width of the information window in pixels.
{int} height
the height of the information window in pixels.
{Object} styleParameters
the object that specifies the custom style parameters.If the value of attribute named tabStyle is "p", tab style will be in partial model which means some tabs may be truncated if they are too long. When the value is "f", tabs will be in full model which means every tabs are full shown.
Returns:
None

<static> {void} MVMapView.enableCodingHints(enabled)
This method enables coding hints that detect potential problems and make suggestions on how to fix them.
Parameters:
{boolean} enabled
a boolean that specifies whether to enable coding hints.
Returns:
None

{void} enableDragging(enabled)
This method enables or disables dragging of the current map.
Parameters:
{boolean} enabled
true (enable dragging) or false (disable dragging).
Returns:
None

{void} enableInfoWindowEventPropagation(enabled)
This method enables event propagation from the info window. When event propagation is enabled, events such as mouse clicks and keyboard strokes are propagated to the rest of the map client instance after they are handled inside the info window. When event propagation is diabled, events are trapped inside the info window and not propapated outside. The latter is usally prefered when the info window needs to handle some events that should only occur to the map decoration itself. By default, event propagation for info window is disabled.
Parameters:
{boolean} enabled
true (enable event propagation) or false (disable event propagation).
Returns:
None

enableKeyboardPanning(enable)
This methods enables or disables keyboard panning. When keyboard panning is enabled, user can pan the map by pressing the arrow keys.
Parameters:
{Boolean} enable
a Boolean that specifies whether to enable keyboard panning, true(enable) or false(disable).

{void} enableLoadingIcon(enable)
This methods enables or disables loading icon. When it is enabled, an animated loading icon is displayed whenever the map client starts loading map tiles and FOIs. The loading icon disappears when all map tiles and FOIs are loaded.
Parameters:
{Boolean} enable
a Boolean that specifies whether to enable loading icon, true(enable) or false(disable).
Returns:
None

enableMapBoundConstraint(enable)
This method sets whether to enable map bound constraint. When enabled, the map can only be dragged within the map area defined by the map coordinate system bounding box, and the map will be automatically centered to the map coordinate system center when the map is at a zoom level where the map DIV container is wider than the whole map area. By default, map bound constraint is enabled.
Parameters:
enable

{void} enableMapWrapAround(enable)
This method sets whether to display the map in the wrap-around manner. When the map is displayed in such manner, the map wraps around the map space boundray horizontally and therefor can be scrolled endlessly horizontally.

All vector theme types, except heatmap theme, can be displayed as a theme based FOI layer in wrap-around mode.

Parameters:
{boolean} enable
a boolean value which indicates the map should be displayed in wrap-around manner or not
Returns:
None

{void} enableMouseWheelZooming(enabled)
This method enables or disables mouse wheel zooming. When mouse wheel zooming is enabled, the user can zoom in the map by scrolling the mouse wheel forward and zoom out the map by scrolling the mouse wheel backward.
Parameters:
{boolean} enabled
a boolean that specifies whether to enable mouse wheel zooming.
Returns:
None

<static> {void} MVMapView.enableTiming(enabled)
This method enables displaying timing measurement as alert message.
Parameters:
{boolean} enabled
a boolean that specifies whether to enable timing.
Returns:
None

<static> {void} MVMapView.enableXMLHTTP(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.

Web browsers usually do not allow cross-domain AJAX calls, which are remote calls made with XMLHttpRequest/XMLHTTP objects to a remote server in a domain different from the domain where the application web pages are hosted. This requires that all map and FOI requests sent from application web pages must be sent to a MapViewer instance in the same domain, which might be inconvienient or even infeasible for some applications. With Oracle Maps, cross domain remote map and FOI requests can be sent in two different ways: with XMLHttpRequest/XMLHTTP objects enabled or disabled. By default, XMLHttpRequest/XMLHTTP objects are disabled when accessing cross domain remote servers.

When XMLHttpRequest/XMLHTTP objects are enabled, cross domain requests are sent via a proxy server that runs in the application local domain and can forward map and FOI requests to any remote server. The proxy server is provided as part of MapViewer and must be deployed in the application local domain. When XMLHttpRequest/XMLHTTP objects are disabled, cross-domain remote map and FOI requests are sent without using XMLHttpRequest/XMLHTTP objects and therefore can be sent direclty to any remote server in any domain without going through any proxy.

When being sent using browser built-in XMLHttpRequest/XMLHTTP objects, remote requests can be send in both asynchronous and synchronous mode. When being sent without using XMLHttpRequest/XMLHTTP objects, remote requests can be sent only in asynchronous mode. In synchronous mode, the application Javascript code that follows the Oracle Maps Javascript client code that initiates the remote request is not executed until the remote request is sent and the response is received from the remote server. In asynchronous mode, the same application code is always executed immediately after the remote request is sent even before the response from the remote server is received. This can be problemetic when the application code needs to wait for the outcome of the remote request/response. To properly handle such situation, the application should pass a call back function to all Oracle Maps client API methods that make remote AJAX calls and pass result back to the application. The call back function is called once the response is received from the server and should implement the application logic that consumes the result returned from the remote server. The call back function can be used for both synchronous and asynchronous remote reqeusts. Here is the list of all such Oracle Maps client API methods.

Parameters:
{Boolean} enable
A boolean that specifies whether to enable XMLHttpRequest/XMLHTTP objects. Its value can be "true"(enable) or "false"(disable).
Returns:
None

{Array} getAllFOIs()
This method gets all user-defined FOI layers in the current map.
Returns:
The FOI object array.

{MVSdoGeometry} getCenter()
This method gets the center of the current map.
Returns:
A point type MVSdoGeometry object that specifies the map center coordinates in the map data coordinate system.

{String} getCopyright()
This method gets the copyright text string currently displayed on the map.
Returns:
The copyright text string

getFOI(id)
This method gets a user-defined FOI object specified by its ID. For instance you can use this method to relate a FOI identified in a tabular view to the map.
Parameters:
{string} id
is a string that uniquely identifies the FOI object.

{String} getMapAsXML(format, width, height)
This method returns the XML map request for the current map. The xml map request can be used to render the current map as a single map image.
Parameters:
{String} format
the map image format.
{int} width
the width of the map image. If omitted, the map image width will be set to the width of the current map div container.
{int} height
the height of the map image. If omitted, the map image height will be set to the height of the current map div container.
Returns:
{String} the XML map request string.

{Object} getMapConfig()
This method gets the map tile layer configuration object. If the map has multiple tile layers, the configuration of a visible tile layer is returned. Please refer to #.addMapTileLayerDefinition for more information about the map tile layer configuration object.
Returns:
The map tile layer configuration object.
See:
#.addMapTileLayerDefinition

{MVSdoGeometry} getMapCoordinates(screenXY)
This method converts the location specified by the screen coordinates to the cooresponding location in the map coordinate system. The screen coordinates are specified as the screen space offsets from the upper-left corner of the map window.
Parameters:
{Object} screenXY
the screen coordinates specified as an object with x and y attributes.
Returns:
MVSdoGeometry

{void} getMapImageURL(callBack, format, width, 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.
Parameters:
{Function} callBack
the user defined function that is called when the server returns the map image URL. The map image URL is passed as the only parameter to this function.
{String} format
the map image format.
{int} width
the width of the map image. If omitted, the map image width will be set to the width of the current map div container.
{int} height
the height of the map image. If omitted, the map image height will be set to the height of the current map div container.
Returns:
none

{void} getMapTileLayerDefinition(callBack, mapTileLayerName, tileServerURL)
This methods gets the map tile layer definition object for a given map tile layer from the map tile server. The map tile layer must have been registered on the MapViewer server side. This method does not return the map tile layer definition object directly. The result map tile layer definition is passed back to the client application as a parameter of a call back function, which the client application must provide when calling this method. Please refer to #addMapTileLayerDefinition for more information about the map tile layer definition object.
Parameters:
{Function} callBack
is a javascript function that is called after the map tile layer definition is fetched from the server side. The map tile layer definition object is passed as the only parameter to this function.
{String} mapTileLayerName
mapTileLayerName is a string that identifies the map tile layer. It is defined in the form of data-source-name.map-tile-layer-name, where map-tile-layer-name specifies the name of the map tile layer that has been pre-defined on the server side and data-source-name specifies the name of the MapViewer data source in which the map tile layer is defined.
{String} tileServerURL
tileServerURL is a string that specifies the URL of the map tile server, which should be in the form http://host:port/mapviewer/mcserver. This is an optional parameter. When omitted, the map tile server URL is derived from the MapViewer base URL specified when creating the MVMapView object.
Returns:
None.

{Array} getMapTileLayers()
This method gets all map tile layers that have been added to the map.
Returns:
An array of MVMapTileLayer objects.

{MVSdoGeometry} getMapWindowBBox()
This method gets the bounding box of the map window defined in map data coordinate system.
Returns:
{MVSdoGeometry} A rectangle MVSdoGeometry object that specifies the current map window bounding box.

{int} getMaxZoomLevel()
This method gets the maximum zoom level of the map.
Returns:
{int} The maximum zoom level.

{MVSdoGeometry} getMouseLocation()
This method gets the current mouse location on the current map.
Returns:
{MVSdoGeometry} A point type MVSdoGeometry object that specifies the current mouse location in the map data coordinate system.

{int} getOrigThemeIndex(themeBasedFOI)
This method gets the original display order of the theme-based FOI layer. This can be used to reset themes back to their original display order using setThemeIndex.
Parameters:
{MVThemeBasedFOI} themeBasedFOI
ThemeBasedFOI is an object that defines the theme-based FOI layer.
Returns:
the original theme-based FOI layer index(1-100)

getPixelsPerXUnit()
This method calculate pixels per X unit

getPixelsPerYUnit()
This method calculate pixels per Y unit

{int} getSrid()
This method gets the current map spatial reference identifier (coordinate system).
Returns:
The current map srid.

{MVThemeBasedFOI} getThemeBasedFOI(layerName)
This method gets a MVThemeBasedFOI object that has been added to the map. The MVThemeBasedFOI object is identified by the given name.
Parameters:
{String} layerName
Theme-based FOI object name.
Returns:
the MVThemeBasedFOI object

{Array} getThemeBasedFOIs()
This method gets all MVThemeBasedFOI objects that have been added to the map.
Returns:
The array of MVThemeBasedFOI objects

{int} getThemeIndex(themeBasedFOI)
This method gets the current display index of the theme-based FOI layer.
Parameters:
{object} themeBasedFOI
themeBasedFOI is the MVThemeBasedFOI object that defines the theme-based FOI layer.
Returns:
The theme-based FOI layer index(1-100)

{int} getZoomLevel()
This method gets the current zoom level of the map.
Returns:
{int} The current zoom level.

origWindowOnkeydownListener(_event)
Parameters:
_event

origWindowOnkeyupListener(_event)
Parameters:
_event

origWindowOnmouseupListener(_event)
Parameters:
_event

origWindowOnResizeListener(_event)
Parameters:
_event

{void} pan(x, y)
This methods pans the map. The panning offset is specified by screen pixels on vertical and horizontal directions.
Parameters:
{int} x
the panning offset in pixels on horizontal direction. A positive value pans the map to the right and a negative value pans the map to the left.
{int} y
the panning offset in pixels on vertical direction. A positive value pans the map downward and a negative value pans the map upward.
Returns:
none.

{void} print(printMapDiv,)
This method generates a printable map and prints it. The printable map must be placed inside a DIV element that is visible to printer but invisible on screen. The size and positioning of the printable map DIV can be customized.
Parameters:
{DIV} printMapDiv,
a DIV element used to hold the printable map image.
Returns:
None

{void} removeAllFOIs()
This method removes all user-defined FOIs from the current map.
Returns:
None

{void} removeFOI(foiOrId)
This method removes a user-defined FOI from the current map.
Parameters:
{object} foiOrId
an FOI object reference or id
Returns:
None

{Void} removeInfoWindow()
This method removes the currently displayed information window.
Returns:
None

{void} removeMapDecoration(mapdecoration)
This method removes a map decoration from the current map.
Parameters:
{MVMapDecoration} mapdecoration
the MVMapDecoration object to be removed
Returns:
None

{void} removeMapTileLayer(mapTileLayer)
This method removes a map tile layer from the map.
Parameters:
{MVMapTileLayer} mapTileLayer
the MVMapTileLayer object that specifies the map tile layer to be removed.
Returns:
None

{void} removeThemeBasedFOI(themebasedfoi)
This method removes a theme-based FOI layer from the map.
Parameters:
{MVThemeBasedFOI} themebasedfoi
the MVThemeBasedFOI object that specifies the theme-based FOI layer to be removed.
Returns:
None

{void} setCenter(mpoint, noSmoothPanning)
This method sets the center of the current map. The map center is defined in the map coordinate system and is specified as an MVSdoGeometry point object.
Parameters:
{MVSdoGeometry} mpoint
an MVSdoGeometry point object that specifies the map center
{Boolean} noSmoothPanning
whether not to pan the map in a animated sliding manner. True if no smooth panning, false otherwise.
Returns:
None

setCenterAndZoomLevel(center, zoomLevel)
This method sets the map center and zoom level.
Parameters:
{MVSdoGeometry} center
an MVSdoGeometry point object that specifies the map center.
{int} zoomLevel
an integer that specifies a valid zoom level.

{void} setCenterMark(img_url, img_width, img_height)
This method displays an image marker at the center of the current map. The center marker does not move when the map is being dragged.
Parameters:
{string} img_url
a string that specifies the URL of the center mark image.
{int} img_width
specifies the width of the image marker.
{int} img_height
specifies the height of the image marker.
Returns:
None

{void} setDefaultFOIImageFormat(format)
This method sets the image format and background color to be used to render FOI images.

The image format can be either png8 or png24. Png8 is faster especially with IE, but it only supports 256 colors and does not support semi-transparency. Png24 supports semi-transparency and much richer colors. The default FOI image format is png24.

The default FOI image format set by this method can be overwritten by MVFOI#setImageFormat and MVThemeBasedFOI#setImageFormat.

Parameters:
{String} format
the default FOI image format.
Returns:
None

setDefaultInfoWindowStyle(style, styleParameters)
This methods sets the default info window style. The info window can be rendered in one of the following three styles: InfoWindowStyle1 and InfoWindowStyle2. The default info window style is InfoWindoStyle1. The info window style can be furthure customized when InfoWindowStyle1 is chosen. The customization parameters are specified in the styleParameters object, which might have the following attributes.

Here is a usage example.

  var parameters = {hideCloseButton:true,
                    closeButtonImageURL:"/mapviewer/fsmc/images/infoicons/close_circle.gif",
                    bodyStyle:"border:2px;border-color:#FF0000;background-color:#FFFFFF",
                    titleBarStyle:"background-color:#8794A3",
                    contentStyle:"padding:10px",
                    coneStyle:"background-color:#00CCAA;opacity:30",
                    offset:10} ;
  mapview.setDefaultInfoWindowStyle("InfoWindowStyle1", parameters);
  
Parameters:
{String} style
the name of the info window style. The possible values are "MVInfoWindowStyle1", "MVInfoWindowStyle2" and "MVInfoWindowStyle3".
{Object} styleParameters
the object that specifies the custom style parameters.

setDoubleClickAction(action)
This method will choose whether to recenter or zoomin when the user doubleclicks the mouse on map
Parameters:
{String} action
it specified the action when the user doubleclicks the mouse on map.If it equals "recenter" the map will move and change the center to the clicked point If it equals "zoomin",the map will zoom in. The default value is "recenter"

<static> {void} MVMapView.setErrorHandler(errorHandler)
This method sets the global error handler that is invoked when an error occurs.

Error handler specified by this method is a global error handler. It is invoked only when there is no instance specific error handler defined.

An error handler is a javascript function which is called when an error occurs. The error message is passed to the error handler as the only parameter. By default, the error handler is "alert", which means a browser alert message window is displayed whenever an error occurs.

Parameters:
{Function} errorHandler
the javascript function to handle errors.
Returns:
None

{void} setErrorHandler(errorHandler)
This method sets the instance specific error handler. Only errors that happen to this MVMapView instance are handled by the error handler specified by this method.

The error handler is a javascript function that is called whenever an error occurs. The error message is passed to error handler as the only parameter. By default, the error handler is "alert", which means a browser alert message window is displayed whenever an error occurs.

Parameters:
{Function} errorHandler
the javascript function to handle errors.
Returns:
None

setEventListener(eventType, listener)
This method is deprecated. Please use #attachEventListener instead.
Parameters:
eventType
listener

setHomeMap(center, zoomlevel)
This method sets the home map location and zoom level. When the home map location and zoom level is set, the user can click on the center button of the navigation panel to bring the map back to its home location and zoom level.
Parameters:
{MVSdoGeometry} center
an MVSdoGeometry point object that specifies the home/original center.
{int} zoomlevel
an integer that specifies the home/original zoom level

{void} setLoadingIconVisible(visible)
This method shows or hides the loading icon.
Parameters:
{Boolean} visible
a Boolean that specifies whether to show or hide the loading icon, true(show) or false(hide).
Returns:
None

<static> {void} MVMapView.setLocale(language, country)
This method sets the Oracle Maps client locale, in which all client side error messages and into tips for built-in utilities are displayed. This method should be called before creating any MVMapView objects and it should be called only once.
Parameters:
{String} language
language is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639.
{String} country
country is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166
Returns:
None

{void} setMouseCursorStyle(cursorStyle, 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.
Parameters:
{String} cursorStyle
A string that specifies the cursor style to be used, which must be one of the standard CSS cursor style names such as "crosshair", "pointer" and "move".
{String} cursorType
A string that specifies when the cursor style should be used. Its value can be one of the following:
  • "default" Cursor style to be used when the mouse is on the map and no mouse key has been pressed.
  • "dragging" Cursor style to be used when the map is being dragged.
    Returns:
    None

    <static> {void} MVMapView.setProxyPath(proxyPath)
    This method sets the path of the proxy server, which is relative to the application domain. When browser built-in XMLHTTP/XMLHttpRequest is enabled, the map client will send all AJAX map and FOI requests to the cross domain map tile and foi servers through the proxy server. The proxy server must be running inside the same domain where the application is running.

    Take the application with a URL like http://host:port/application_context/application_page for an example, the application domain is host:port, the context root path of the application is application_context. The proxy server must be running inside the same domain and its URL should be something like http://host:port/proxy_context/proxy_server_name, where proxy_context is the context root of the proxy server and proxy_server_name is the name of the proxy server. The relative path of the proxy server is /proxy_context/proxy_server_name. The default path of the proxy server is /mapviewer/proxy, which points to the proxy server shipped with MapViewer.

    Parameters:
    {String} proxyPath
    a String the specifies the relative path of the proxy server objects. Its value can be "true"(enable) or "false"(disable).
    Returns:
    None
    See:
    #enableXMLHTTP

    {void} setThemeIndex(themeBasedFOI, index)
    This method sets the display index of the theme-based FOI layer.
    Parameters:
    {MVThemeBasedFOI} themeBasedFOI
    an MVThemeBasedFOI object that defines the theme-based FOI layer.
    {int} index
    Display index(1-100)
    Returns:
    None

    {void} setToOrigThemeIndex(themeBasedFOI)
    This method sets the display index of the theme-based FOI layer to its original value.
    Parameters:
    {MVThemeBasedFOI} themeBasedFOI
    an MVThemeBasedFOI object that specifies the theme-based FOI layer.
    Returns:
    None

    <static> {void} MVMapView.setUtilImgURL(url)
    This method sets the base URL of the UI utility images. The UI utility images are used by the Oracle Maps client to display built-in utilities, such as navigation panel, tool bar, scale bar and information window. The URL should point to the root directory where these images are stored, which is $MAPVIEWER_DEPLOY_HOME/web/fsmc/images. The URL usually looks like http://host:port/mapviewer/fsmc/images/.
    Parameters:
    {String} url
    A string that specifies the base URL of the UI utility images.
    Returns:
    None

    {void} setZoomAnimationEnabled(enabledOrNot)
    This method enables or disables zoom animation. If enabledOrNot is true, animation effect will show when zoom in/out.
    Parameters:
    {boolean} enabledOrNot
    a boolean value which indicates whether or not to enable zoom animation
    Returns:
    None

    {void} setZoomLevel(zoom)
    This method sets the current zoom level of the map.
    Parameters:
    {int} zoom
    an integer that specifies the map zoom level.
    Returns:
    None

    {void} startMarqueeZoom(mode, rectStyle, minRectSize)
    This method, when invoked, allows user to zoom the map by hand drawing a rectangle on the map. The map center and zoom level is adjusted so that the rectangle area can most closely fill the map. The marquee zoom tool can be invoked in one of the following modes:
    The style of the marquee zoom rectangle can be specified by parameter rectStyle, an object that may have the following attributes:
    The following code shows how to create such an object.
    var rectStyle = new Object() ;
    rectStyle.borderColor = "#00FF00" ;
    rectStyle.borderWidth = 1;
    rectStyle.borderDashed = true ;
    rectStyle.fillColor = "#FF0000" ;
    rectStyle.fillOpacity = 0.5 ;
    
    Parameters:
    {String} mode
    a String that specifies the mode of the marquee zoom tool. It can be either "one_time" or "continuous". If omitted, the marquee zoom tool is started in "one_time" mode.
    {Object} rectStyle
    an object that specifies the rectangle style. If omitted, the marquee zoom rectangle is drawn in 1) the default style if this method is invoked for the first time, or 2) the style used previously when invoking this method before.
    {int} minRectSize
    a integer that specifies the minimum effective size of the rectangle in screen pixels. The map is zoomed in only when the user draws a rectangle with both height and width being equal to or larger than the mininum effective size. For example, when minRectSize is 5, a 5x5 rectangle will result in map zooming, while neither a 3x4 nor a 2x10 rectangle will result in map zooming.
    Returns:
    none

    {void} stopMarqueeZoom()
    This method disables the marquee zoom tool.
    Returns:
    none

    {MVSdoGeometry} transformGeom(geometry, toSrid, mcsURL, callBack, dataSource)
    This method transforms the input geometry from one coordinate system to another coordinate system. When this method is called, the map client sends a request to the map tile server, which invokes Oracle Spatial utilities to perform coordinate system transformation and then returns the result to the client.

    When XMLHTTP/XMLHttpRequest objects are enabled, the request for coordinate system transformation is sent in synchronous mode and the application javascript code following this method call will not be executed until the transformation result is returned from the server. When XMLHTTP/XMLHttpRequest objects are disabled, the request is sent in asynchronous mode without pausing for the server side transformation result. In this case, all application code that depends on the transformation result should be packed into a call back function so that it can be executed only after transformation result is returned. When the call back function is invoked after the result is returned, the transformed geometry is passed into the call back function as the only parameter.

    Please refer to #enableXMLHTTP for more information.

    Parameters:
    {MVSdoGeometry} geometry
    the MVSdoGeometry object to be transformed.
    {int} toSrid
    that specifies the SRID of the destination coordinate system.
    {string} mcsURL
    an optional parameter that specifies the URL of the map tile server to be used to perform the coordinate system transformation. If this parameter is omitted, the map tile server associated with the first map tile layer is used.
    {function} callBack
    the call back function that is execuated after the coordinate system transformation is finished.
    {String} dataSource
    the name of the mapviewer data source inside which the server side length calculation is to be performed. If omitted, the data source associated with the first map tile layer added is used.
    Returns:
    The resulting MVSdoGeometry object when XMLHTTP/XMLHttpRequest objects are enabled. Null when XMLHTTP/XMLHttpRequest objects are disabled.
    See:
    #enableXMLHTTP

    wrapAroundLayer(layerwidth)
    This method calculate the map is wrap-around in curren map window
    Parameters:
    layerwidth

    {void} zoomIn(center)
    This method zooms the map in by one zoom level.
    Parameters:
    {MVSdoGeometry} center
    optional, an MVSdoGeometry that specifies the new center of the map after zooming.
    Returns:
    None

    {void} zoomOut(center)
    This method zooms the map out by one zoom level.
    Parameters:
    {MVSdoGeometry} center
    optional, an MVSdoGeometry that specifies the new center of the map after zooming.
    Returns:
    None

    {void} zoomToRectangle(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.
    Parameters:
    {MVSdoGeometry} sdoRectangle
    an MVSdoGeometry object that specifies the rectangle area to fill the map.
    Returns:
    none
    Requires:
    MVSdoGeometry

    Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:46 GMT-0500 (EST)