Class Index | File Index

Classes


Class IMapper

IMapper class This class could be considered a concrete implementation class
Defined in: locationbox_main.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Create a new IMapper instance.
Method Summary
Method Attributes Method Name and Description
 
addBingTileLayer(bingKey, hybrid)
Add Bing tile layer
 
addCircle(id, latitude, longitude, radius, name, sym, mclick, zindex)
Add a circle by specifying its center point and radius.
 
addCollapsibleMapDecoration(id, html, width, height, minimizeWhenCreated, style)
Add a map decoration in lower right corner of the map window.
 
addCollapsibleOverview(title, width, height, state)
Add collapsible overview to the map
 
addCustomMarker(id, latitude, longitude, name, imageUrl, mclick, zindex, width, height)
Add a marker pointing to a specified point.
 
Add a distance measuring tool to the map
 
addHtmlMarker(id, latitude, longitude, html, zindex)
Add an HTML content as marker pointing to a specified point.
 
Add image layer to map.
 
addLabelToMarker(id, html, name, xOffset, yOffset)
Add a label to a specified marker.
 
addLine(id, ordinates, name, sym, mclick, zindex)
Add a line specified by array of coordinates.
 
addMapDecoration(id, html, top, left, width, height, mclick)
Display an HTML map decoration object on the map.
 
addMarker(id, latitude, longitude, name, sym, w, h, mclick, zindex)
Add a marker pointing to a specified point.
 
addMarkerGroup(id, array, minZoomLevel, maxZoomLevel, zindex)
Add marker group to the map
 
Add navigation panel to the map
 
addOverview(ovdiv)
Add overview to the map
 
Add pharmacy on duty layer to the map
 
addPoiList(id, poiList, mouseclick)
Add poi list to the map
 
addRegion(id, ordinates, name, sym, mclick, zindex)
Add a region as a polygon specified by array of coordinates.
 
addRoute(id, pathId, sym, mclick)
Add an existing route path to the map.
 
addScaleBar(position, hOffset, vOffset, transformToGeodetic)
Add scale bar to the map
 
Add social events to the map
 
Add the traffic event data on the map.
 
addTrafficTmc(tmcKodList)
Add the visualized traffic data on the map.
 
addWeatherReport(enablelabel, mouseclick)
Add weather report layer to the map
 
addYolList(id, yolList)
Add yol list to the map
 
animateMarker(id, ordinates, interval)
Move a marker to a specified position or visit a set of positions.
 
animateMarkerFlow(tmcKod, interval, sym, width, height, repeat, factor, reverse)
Animates the marker flow according to TMC code geometries.
 
Clear the circle tool.
 
clearMapListener(event, callback)
Clear map listener from the map.
 
clearMarkerListener(id, event, callback)
Set marker listener.
 
Clear the measure tool
 
Clear polygon tool
 
Clear the rectangle tool.
 
Clear the red line tool.
 
createAdvancedStyle(name, symlist, dtype)
Create an advanced style object
 
createColorStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth)
Create a style object.
 
createIconMarkerStyle(name, url, width, height)
Create an icon marker style object
 
createVectorMarkerStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth, width, height, vector)
Create a vector marker style object.
 
displayInfoWindow(latitude, longitude, html, width, height, title, parameters)
Display an info window at specified latitude/longitude.
 
This method enables or disables dragging of the current map.
 
This methods enables or disables keyboard panning.
 
This methods enables or disables loading icon.
 
This method enables or disables mouse wheel zooming.
 
Get center latitude
 
Get center longitude
 
Get radius and center coordinates of the circle drawn by the circle tool.
 
This method returns the ordinates object that specifies a polygon that proximates the circle on the map.
 
getGeolocation(callback)
Get the location of user.
 
Get the coordinates of point clicked on map.
 
Display an info window at specified latitude/longitude.
 
Get coordinates of the bounding box of the map window
 
Get Marker
 
Get maximum zoom level
 
Get coordinates of the location that mouse points
 
Get polygon ordinates.
 
Get an array of ordinates of the rectangle drawn with the rectangle tool.
 
Get an array of ordinates of the shape drawn with the red line tool.
 
Get zoom level
 
Hide the visualized traffic data on the map.
 
initMap(mapCenterLat, mapCenterLon, mapZoom, pBaseMap, pUrlBase, mapDiv)
Initialize the IMapper object
 
initMapWithExtent(minLat, minLon, maxLat, maxLon, pBaseMap, pUrlBase, mapDiv)
Initialize the IMapper object with given extent coordinates
 
moveMarker(id, latitude, longitude, zindex)
Update the marker with given id and set latitude, longitude and z-index values to that marker
 
pan(typ)
Pan the map for half length of the view to the specified direction.
 
print(callback, width, height)
Print the map being viewed.
 
Remove Bing Tile Layer from the map
 
Remove an added feature by specifying its id.
 
Remove image layer from map
 
Remove the existing info window.
 
Remove the label from a specified marker.
 
Remove the map decoration by specifying its id.
 
Remove pharmacy on duty layer from the map
 
Remove poi list from the map
 
Remove an existing route path from the map.
 
Remove social events from the map
 
Remove the traffic event data from the map.
 
Remove Traffic TMC from the map
 
Remove weather report layer from the map
 
Remove yol list to the map
 
setCircleTool(getCircle, getDragEvent)
Initialize the circle tool.
 
setMapListener(event, callback)
Initialize map listener.
 
Set marker group maximum visible zoom level
 
Set marker group minimum visible zoom level
 
setMarkerGroupVisible(id, visible)
Add marker group to the map
 
setMarkerImageUrl(id, url, w, h)
Set Marker Image Url
 
setMarkerListener(id, event, callback)
Set marker listener.
 
setMarkerVisible(id, visible)
Set Marker Visible
 
setMeasureTool(getNewPoint, getNewLine)
Add an instance of Measure Tool to the current map.
 
Draw polygon by using the given ordinates.
 
setRectangleTool(getRectangle)
Initialize the rectangle tool.
 
Initialize the red line tool.
 
showMapCentered(mapCenterLat, mapCenterLon, mapZoom)
Show map defined by its center point
 
showMapRectangle(minLat, minLon, maxLat, maxLon)
Show map defined by a bounding rectangle
 
showTrafficView(zindex, mapDiv)
Show the visualized traffic data on the map.
 
Initialize marquee zoom tool.
 
Stop Marker Flow Animation
 
Stop marquee zoom.
 
xml2json(xmlData)
Parse xml data to convert into json format.
 
Zoom in by one level.
 
zoomLevel((int))
Set zoom level
 
Zoom out by one level.
 
Zoom to the area bounded by multiple markers.
Class Detail
IMapper()
Create a new IMapper instance.
Method Detail
addBingTileLayer(bingKey, hybrid)
Add Bing tile layer
Parameters:
{string} bingKey
The key for Bing service
{boolean} hybrid
Default: false (Satelite) true: Hybrid

addCircle(id, latitude, longitude, radius, name, sym, mclick, zindex)
Add a circle by specifying its center point and radius.
Parameters:
{string} id
Id of the circle object.
{float} latitude
The latitude value of center point.
{float} longitude
The longitude value of center point.
{float} radius
The radius value of the circle
{string} name
The name of the circle object.
{string} sym
The name of the symbol for circle, as written on the map database.
{Function} mclick
The user defined function that is called when the circle is clicked.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
See:
http://www.locationbox.com.tr/web/demo/addcircle.jsp

addCollapsibleMapDecoration(id, html, width, height, minimizeWhenCreated, style)
Add a map decoration in lower right corner of the map window. This object is as same as the map decoration, only appears in a collapsible window and can be minimized.
Parameters:
{string} id
A string that identifies the map decoration object.
{string} html
An HTML content string that is going to be displayed inside the map decoration.
{int} width
The width of map decoration in pixels.
{int} height
The height of map decoration in pixels.
{Boolean} minimizeWhenCreated
True if the map decoration is minimized when the map decoration is added to the map. The default value is false.
{Object} style
The style object.
See:
http://www.locationbox.com.tr/web/demo/mapdecoration.jsp

addCollapsibleOverview(title, width, height, state)
Add collapsible overview to the map
Parameters:
{String} title
The title of the overview window
{int} width
The width of the overview window
{int} height
The height of the overview window
{boolean} state
See:
http://www.locationbox.com.tr/web/demo/overview_collapsible.jsp

addCustomMarker(id, latitude, longitude, name, imageUrl, mclick, zindex, width, height)
Add a marker pointing to a specified point. Any image can be used as a marker.
Parameters:
{string} id
Id of the marker.
{int} latitude
The latitude value of the point.
{int} longitude
The longitude value of the point.
{string} name
Name of the marker.
{string} imageUrl
Path of the image to be used as marker.
{obj} mclick
The user defined function that is called when the marker is clicked.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
{int} width
The width of marker symbol in pixels.
{int} height
The height of marker symbol in pixels.
See:
http://www.locationbox.com.tr/web/demo/addcustommarker.jsp

addDistanceMeasuringTool()
Add a distance measuring tool to the map
See:
http://www.locationbox.com.tr/web/demo/distancemeasuring.jsp

addHtmlMarker(id, latitude, longitude, html, zindex)
Add an HTML content as marker pointing to a specified point.
Parameters:
{string} id
Id of the marker.
{int} latitude
The latitude value of the point.
{int} longitude
The longitude value of the point.
{string} html
HTML content
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.

addImageLayer()
Add image layer to map.

addLabelToMarker(id, html, name, xOffset, yOffset)
Add a label to a specified marker.
Parameters:
{string} id
Id of the marker.
{string} html
The html content of the label.
{string} name
Name of the line object.
{int} xOffset
Horizontal offset value for the position of the label.
{int} yOffset
Vertical offset value for the position of the label
See:
http://www.locationbox.com.tr/web/demo/addmarkerwlabel.jsp

addLine(id, ordinates, name, sym, mclick, zindex)
Add a line specified by array of coordinates.
Parameters:
{string} id
Id of the line object.
{array} ordinates
The set of coordinates.
{string} name
Name of the line object.
{string} sym
The name of the style object for line, as in the map database or created by user. (@See createColorStyle)
{Function} mclick
The user defined function that is called when the line is clicked.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
See:
http://www.locationbox.com.tr/web/demo/addline.jsp

addMapDecoration(id, html, top, left, width, height, mclick)
Display an HTML map decoration object on the map. A map decoration object may be placed on top of the map and does not move while the map is recentered.
Parameters:
{string} id
A string that identifies the map decoration object.
{string} html
An HTML content string that is going to be displayed inside the map decoration.
{float} top
The vertical position of the map decoration relative to the top border of map window.
{float} left
The horizontal poisiton of the map decoration relative to left border of map window.
{int} width
The width of map decoration in pixels.
{int} height
The height of map decoration in pixels.
{Function} mclick
The function for mouse click event
See:
http://www.locationbox.com.tr/web/demo/mapdecoration.jsp
Map decoration can be used as a collapsible window (@link addCollapsibleMapDecoration) so that it can be minimized by the user.

addMarker(id, latitude, longitude, name, sym, w, h, mclick, zindex)
Add a marker pointing to a specified point.
Parameters:
{string} id
Id of the marker.
{int} latitude
The latitude value of the point.
{int} longitude
The longitude value of the point.
{string} name
Name of the marker.
{string} sym
The name of the style object for marker, as in the map database or created by user. (@See createColorStyle)
{int} w
The width of marker symbol in pixels.
{int} h
The height of marker symbol in pixels.
{Function} mclick
The user defined function that is called when the marker is clicked.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
See:
http://www.locationbox.com.tr/web/demo/addmarker.jsp

addMarkerGroup(id, array, minZoomLevel, maxZoomLevel, zindex)
Add marker group to the map
Parameters:
{string} id
The id of group marker.
{Array} array
Array of Markers that need to be grouped.
{int} minZoomLevel
The minimum zoom level that will be visible for marker group.
{int} maxZoomLevel
The maximum zoom level that will be visible for marker group.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.

addNavigationPanel(loc)
Add navigation panel to the map
Parameters:
{string} loc
The parameter to set the navigation to east or west. Default: west
See:
http://www.locationbox.com.tr/web/demo/navigationpanel.jsp

addOverview(ovdiv)
Add overview to the map
Parameters:
{String} ovdiv
The div to set the overview window. If it is null or not specified then it is set as "ow".
See:
http://www.locationbox.com.tr/web/demo/overview.jsp

addPharmacyOnDuty()
Add pharmacy on duty layer to the map
See:
http://www.locationbox.com.tr/web/demo/pharmacyonduty.jsp

addPoiList(id, poiList, mouseclick)
Add poi list to the map
Parameters:
{string} id
The id of POI list.
{array} poiList
The list of POIs.
{function} mouseclick
The user defined function that is called when layer is clicked.
See:
http://www.locationbox.com.tr/web/demo/addpoi.jsp

addRegion(id, ordinates, name, sym, mclick, zindex)
Add a region as a polygon specified by array of coordinates.
Parameters:
{string} id
Id of the polygon object.
{array} ordinates
The set of coordinates.
{string} name
Name of the polygon object.
{string} sym
Name of the style object for polygon, as in the map database or created by user. (@See createColorStyle)
{Function} mclick
The user defined function that is called when the region is clicked.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
See:
http://www.locationbox.com.tr/web/demo/addregion.jsp

addRoute(id, pathId, sym, mclick)
Add an existing route path to the map.
Parameters:
{string} id
Id of the route object.
{int} pathId
The id of the existing path (See http://www.locationbox.com.tr/web/api_route.jsp).
{string} sym
Name of the symbol for the path style, should be specified as written on the map database.
{Function} mclick
The user defined function that is called when layer is clicked.
See:
http://www.locationbox.com.tr/web/demo/addroute.jsp

addScaleBar(position, hOffset, vOffset, transformToGeodetic)
Add scale bar to the map
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.
See:
http://www.locationbox.com.tr/web/demo/scalebar.jsp

addSocialEvents()
Add social events to the map
See:
http://www.locationbox.com.tr/web/demo/addsocialevents.jsp

addTrafficEvents()
Add the traffic event data on the map.
See:
http://www.locationbox.com.tr/web/demo/addtrafficinfo.jsp

addTrafficTmc(tmcKodList)
Add the visualized traffic data on the map.
Parameters:
{array} tmcKodList
The array of TMC code list.
See:
http://www.locationbox.com.tr/web/demo/addtmctrafficinfowithflow.jsp

addWeatherReport(enablelabel, mouseclick)
Add weather report layer to the map
Parameters:
{boolean} enablelabel
The boolean value for enabling the label.
{function} mouseclick
The user defined function that is called when layer is clicked.
See:
http://www.locationbox.com.tr/web/demo/addweatherreport.jsp

addYolList(id, yolList)
Add yol list to the map
Parameters:
{string} id
Id of YolList.
{array} yolList
YolID list.
See:
http://www.locationbox.com.tr/web/demo/addyol.jsp

animateMarker(id, ordinates, interval)
Move a marker to a specified position or visit a set of positions.
Parameters:
{string} id
Id of the marker.
{Array} ordinates
The set of coordinates.
{int} interval
affects the marker moving speed. The default value is 100. A larger value results in a slower movement.
See:
http://www.locationbox.com.tr/web/demo/addanimatedmarker.jsp

animateMarkerFlow(tmcKod, interval, sym, width, height, repeat, factor, reverse)
Animates the marker flow according to TMC code geometries.
Parameters:
{string} tmcKod
TMC code.
{int} interval
affects the marker moving speed. The default value is 100. A larger value results in a slower movement.
{string} sym
The name of the style object for marker, as in the map database or created by user.
{int} width
The width of marker symbol in pixels.
{int} height
The height of marker symbol in pixels.
{boolean} repeat
Animation repeats(true) or not
{string} factor
The interval between repeat time duration.
{boolean} reverse
Reversed ordinates
See:
http://www.locationbox.com.tr/web/demo/addtmctrafficinfowithflow.jsp

clearCircleTool()
Clear the circle tool.

clearMapListener(event, callback)
Clear map listener from the map.
Parameters:
{string} event
Name of the event being listened. (See http://www.locationbox.com.tr/web/demo/eventlistener.jsp for the events.)
{Function} callback
The user defined function that is called when a map event is fired.

clearMarkerListener(id, event, callback)
Set marker listener.
Parameters:
{string} id
Id of the marker.
{object} event
Types of events.
IMapper.MARKER_MOUSE_CLICK
IMapper.MARKER_MOUSE_OVER
IMapper.MARKER_MOUSE_OUT
IMapper.MARKER_MOUSE_RIGHT_CLICK
{function} callback
The user defined function that is called when marker is set.

clearMeasureTool()
Clear the measure tool

clearPolygonTool()
Clear polygon tool

clearRectangleTool()
Clear the rectangle tool.

clearRedlineTool()
Clear the red line tool.

{object} createAdvancedStyle(name, symlist, dtype)
Create an advanced style object
Parameters:
{string} name
Name of the style
{string} symlist
List of styles in JSON format.
dtype
Returns:
{object} Style object containing list of style objects.
See:
http://www.locationbox.com.tr/web/demo/analysisadvancedcoloring.jsp

{object} createColorStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth)
Create a style object.
Parameters:
{string} name
Name of the style
{string} fillColor
Filling color. A string in the format of "RRGGBB", or null if no filling.
{int} fillOpacity
Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
{string} borderColor
Border color. A string in the format of "RRGGBB".
{int} borderOpacity
Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
{int} borderWidth
Border width in device point/pixel unit. Default is 1.
Returns:
{object} Style object
See:
http://www.locationbox.com.tr/web/demo/layercoloring.jsp

{object} createIconMarkerStyle(name, url, width, height)
Create an icon marker style object
Parameters:
{string} name
Name of the style
{string} url
Image url
{int} width
Marker width in pixels
{int} height
Marker width in pixels
Returns:
{object} Style object

{object} createVectorMarkerStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth, width, height, vector)
Create a vector marker style object.
Parameters:
{string} name
Name of the style
{string} fillColor
Filling color. A string in the format of "RRGGBB", or null if no filling.
{int} fillOpacity
Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
{string} borderColor
Border color. A string in the format of "RRGGBB".
{int} borderOpacity
Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
{int} borderWidth
Border width in device point/pixel unit. Default is 1.
{int} width
Marker width in pixels.
{int} height
Marker height in pixels.
{object} vector
Sets the shape coordinates for the vector type marker. It basically supports two types of shapes: polygon/polyline and circle. For polygon/polyline (which can be used to represent rectangle, triangle and other simple shapes), the parameter must be a series of comma separated ordinates (x1,y1,x2,y2,...). Note that for polygon/polyline shapes, the cooridnates can be in any coordinate system with arbitrary origin. LocationBox will do all the necessary transformation at the server side. For instance, the following cooridnates represent a diamond shape: "50,199,0,100,50,1,100,100,50,199" For circle type marker, the parameter must start with "c:" and followed by a single numeric value representing the radius of the cirlce, such as "c:50".
Returns:
{object} Style object
See:
http://www.locationbox.com.tr/web/demo/layercoloring.jsp

displayInfoWindow(latitude, longitude, html, width, height, title, parameters)
Display an info window at specified latitude/longitude.
Parameters:
{int} latitude
The latitude value of the point that info window going to be displayed.
{int} longitude
The longitude value of the point that info window going to be displayed.
{string} html
An HTML content string that is going to be displayed inside the info window.
{int} width
The width of the info window in pixels.
{int} height
The height of the info window in pixels.
{string} title
A string that is going to be displayed at the header of the info window.
{Object} parameters
the object that specifies the custom style parameters, which are effective only when the info window style is "MVInfoWindowStyle1"..
See:
http://www.locationbox.com.tr/web/demo/addHTMLmarker.jsp

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

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

enableLoadingIcon(a)
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} a
Boolean that specifies whether to enable loading icon, true(enable) or false(disable). (Default: true)

enableMouseWheelZooming(a)
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:
a
boolean that specifies whether to enable mouse wheel zooming. (Default: true)

getCenterLat()
Get center latitude
Returns:
(double) Y point

getCenterLon()
Get center longitude
Returns:
(double) X point

{obj} getCircleData()
Get radius and center coordinates of the circle drawn by the circle tool.
Returns:
Radius and center coordinates of the circle drawn by the circle tool.
See:
http://www.locationbox.com.tr/web/demo/circletool.jsp

getCirclePolygonOrdinates()
This method returns the ordinates object that specifies a polygon that proximates the circle on the map.
Returns:
ordinates obj

getGeolocation(callback)
Get the location of user.
Parameters:
{function} callback
Callback function
See:
http://www.locationbox.com.tr/web/demo/getlocation.jsp

{obj} getMapClickPosition()
Get the coordinates of point clicked on map.
Returns:
The map click position.

{object} getMapCoordinates(x, y)
Display an info window at specified latitude/longitude.
Parameters:
{int} x
{int} y
Returns:
{object}

getMapRectangle()
Get coordinates of the bounding box of the map window
Returns:
(object)

getMarker(id)
Get Marker
Parameters:
{int} id
The id of marker.

getMaxZoomLevel()
Get maximum zoom level
Returns:
(int) Max zoom level

getMouseLocation(mc)
Get coordinates of the location that mouse points
Parameters:
mc
Returns:
(object)

{array} getPolygonOrdinates()
Get polygon ordinates.
Returns:
{array} ordinates The list of ordinates
See:
http://www.locationbox.com.tr/web/demo/redlinetool.jsp

{array} getRectangleOrdinates()
Get an array of ordinates of the rectangle drawn with the rectangle tool.
Returns:
Ordinates of the rectangle drawn.
See:
http://www.locationbox.com.tr/web/demo/rectangletool.jsp

{array} getRedlineOrdinates()
Get an array of ordinates of the shape drawn with the red line tool.
Returns:
Ordinates of the shape drawn.

getZoomLevel()
Get zoom level
Returns:
(int) Zoom level

hideTrafficView()
Hide the visualized traffic data on the map.

initMap(mapCenterLat, mapCenterLon, mapZoom, pBaseMap, pUrlBase, mapDiv)
Initialize the IMapper object
Parameters:
{int} mapCenterLat
The latitude value of center coordinate of the map
{int} mapCenterLon
The longitude value of center coordinate of the map
{int} mapZoom
Initial zoom level of map (1-14)
{String} pBaseMap
Name of the basemap. Three types of basemap is defined in LocationBox.
IMapper.BASEMAP_SIMPLE - Simple basemap displaying limited administrative data. (cities, borders)
IMapper.BASEMAP_POI - Basemap showing POIs additional to administrative data. (cities, borders, roads etc.)
IMapper.BASEMAP_POI_LOGO - Basemap showing POIs represented by their own logos.

If basemap is not specified, default basemap is BASEMAP_POI_LOGO.
{String} pUrlBase
Url of the map server.
If url base is not specified, default url base is http://www.locationbox.com.tr/mapviewer
{String} mapDiv
The div to set the map. If it is null or not specified then it is set as "map".

initMapWithExtent(minLat, minLon, maxLat, maxLon, pBaseMap, pUrlBase, mapDiv)
Initialize the IMapper object with given extent coordinates
Parameters:
{double} minLat
The minimum latitude extent of the map
{double} minLon
The minimum longitude extent of the map
{double} maxLat
The maximum latitude extent of the map
{double} maxLon
The maximum longitude extent of the map
{String} pBaseMap
Name of the basemap. Three types of basemap is defined in LocationBox.
IMapper.BASEMAP_SIMPLE - Simple basemap displaying limited administrative data. (cities, borders)
IMapper.BASEMAP_POI - Basemap showing POIs additional to administrative data. (cities, borders, roads etc.)
IMapper.BASEMAP_POI_LOGO - Basemap showing POIs represented by their own logos.

If basemap is not specified, default basemap is BASEMAP_POI_LOGO.
{String} pUrlBase
Url of the map server.
If url base is not specified, default url base is http://www.locationbox.com.tr/mapviewer
{String} mapDiv
The div to set the map. If it is null or not specified then it is set as "map".

moveMarker(id, latitude, longitude, zindex)
Update the marker with given id and set latitude, longitude and z-index values to that marker
Parameters:
{string} id
Id of the marker.
{int} latitude
The latitude value of the point.
{int} longitude
The longitude value of the point.
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.

pan(typ)
Pan the map for half length of the view to the specified direction. 8 directions are available for pan.
Parameters:
{int} typ
Pan direction. (Gets a value between 1 and 8, 1 being North and 8 being North-West in clock-wise direction.)

print(callback, width, height)
Print the map being viewed.
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.
{int} width
The width of the map image.
{int} height
The height of the map image.

removeBingTileLayer()
Remove Bing Tile Layer from the map

removeFeature(id)
Remove an added feature by specifying its id.
Parameters:
{string} id
Id of the feature.

removeImageLayer()
Remove image layer from map

removeInfoWindow()
Remove the existing info window.

removeLabelFromMarker(id)
Remove the label from a specified marker.
Parameters:
{string} id
Id of the marker.

removeMapDecoration(id)
Remove the map decoration by specifying its id.
Parameters:
{string} id
Id of the map decoration.

removePharmacyOnDuty()
Remove pharmacy on duty layer from the map

removePoiList(id)
Remove poi list from the map
Parameters:
{string} id
The id of POI list.

removeRoute(id)
Remove an existing route path from the map.
Parameters:
{string} id
Id of the route object.

removeSocialEvents()
Remove social events from the map

removeTrafficEvents()
Remove the traffic event data from the map.

removeTrafficTmc()
Remove Traffic TMC from the map

removeWeatherReport()
Remove weather report layer from the map

removeYolList(id)
Remove yol list to the map
Parameters:
{string} id
Id of YolList.

setCircleTool(getCircle, getDragEvent)
Initialize the circle tool.
Parameters:
getCircle
getDragEvent
See:
http://www.locationbox.com.tr/web/demo/circletool.jsp

setMapListener(event, callback)
Initialize map listener.
Parameters:
{string} event
Name of the event being listened.
{Function} callback
The user defined function that is called when a map event is fired.
See:
http://www.locationbox.com.tr/web/demo/eventlistener.jsp

setMarkerGroupMaxVisibleZoomLevel(id, zoomLevel)
Set marker group maximum visible zoom level
Parameters:
{string} id
Id of marker group
{int} zoomLevel
Zoomlevel of the marker group

setMarkerGroupMinVisibleZoomLevel(id, zoomLevel)
Set marker group minimum visible zoom level
Parameters:
{string} id
Id of marker group
{int} zoomLevel
Zoomlevel of the marker group

setMarkerGroupVisible(id, visible)
Add marker group to the map
Parameters:
{string} id
Id of marker group
{boolean} visible
Visibility of the layer

setMarkerImageUrl(id, url, w, h)
Set Marker Image Url
Parameters:
{int} id
The id of marker.
{string} url
Image url
{int} w
Marker width in pixels
{int} h
Marker width in pixels

setMarkerListener(id, event, callback)
Set marker listener.
Parameters:
{string} id
Id of the marker.
{object} event
Types of events.
IMapper.MARKER_MOUSE_CLICK
IMapper.MARKER_MOUSE_OVER
IMapper.MARKER_MOUSE_OUT
IMapper.MARKER_MOUSE_RIGHT_CLICK
{function} callback
The user defined function that is called when marker is set.

setMarkerVisible(id, visible)
Set Marker Visible
Parameters:
{int} id
The id of marker.
{boolean} visible
Visibility of the marker

setMeasureTool(getNewPoint, getNewLine)
Add an instance of Measure Tool to the current map.
Parameters:
getNewPoint
getNewLine

setPolygonOrdinates(ordinates)
Draw polygon by using the given ordinates.
Parameters:
{array} ordinates
The list of ordinates
See:
http://www.locationbox.com.tr/web/demo/redlinetool.jsp

setRectangleTool(getRectangle)
Initialize the rectangle tool.
Parameters:
getRectangle
See:
http://www.locationbox.com.tr/web/demo/rectangletool.jsp

setRedlineTool()
Initialize the red line tool.

showMapCentered(mapCenterLat, mapCenterLon, mapZoom)
Show map defined by its center point
Parameters:
{int} mapCenterLat
The latitude value of center coordinate of the map
{int} mapCenterLon
The longitude value of center coordinate of the map
{int} mapZoom
Initial zoom level of map (1-14)

showMapRectangle(minLat, minLon, maxLat, maxLon)
Show map defined by a bounding rectangle
Parameters:
{int} minLat
The latitude value of upper left corner coordinate of the rectangle
{int} minLon
The longitude value of upper left corner coordinate of the rectangle
{int} maxLat
The latitude value of lower right corner coordinate of the rectangle
{int} maxLon
The longitude value of lower right corner coordinate of the rectangle

showTrafficView(zindex, mapDiv)
Show the visualized traffic data on the map.
There are 4 grades of traffic density represented by 4 colors:
Light Green: Little or no traffic density. No delay.
Dark Green: Increasing traffic density. Slight delay.
Orange: Increased traffic density.
Red: Traffic jam.
Parameters:
{int} zindex
This method sets the z-index (display order) value of the marker group. The group with a larger z-index value is displayed above the group with a smaller z-index value.
{String} mapDiv
The div to set the map. If it is null or not specified then it is set as "map".
See:
http://www.locationbox.com.tr/web/demo/addtrafficinfo.jsp

startMarqueeZoom()
Initialize marquee zoom tool.

stopMarkerFlowAnimation(tmcKod)
Stop Marker Flow Animation
Parameters:
{string} tmcKod
TMC code.

stopMarqueeZoom()
Stop marquee zoom.

{obj} xml2json(xmlData)
Parse xml data to convert into json format.
Parameters:
xmlData
Returns:
Json object.

zoomIn()
Zoom in by one level.

zoomLevel((int))
Set zoom level
Parameters:
(int)
mapZoom Zoom level. Takes an integer value from 1 to 8.

zoomOut()
Zoom out by one level.

zoomToMarkers(list)
Zoom to the area bounded by multiple markers.
Parameters:
{string} list
Id list of markers as a single string, separated by comma (,).

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 25 2014 11:26:06 GMT+0300 (EEST)