Methods
-
addBingTileLayer(bingKey, hybrid)
-
Add Bing tile layer.
Parameters:
Name Type Description bingKeystring The key for Bing service.
hybridboolean Default: false (Satelite) true: Hybrid.
- Source:
-
addCircle(id, latitude, longitude, radius, name, sym, mouseClick, zindex)
-
Add a circle by specifying its center point and radius.
Parameters:
Name Type Description idstring Id of the circle object.
latitudefloat The latitude value of center point.
longitudefloat The longitude value of center point.
radiusfloat The radius value of the circle.
namestring The name of the circle object.
symstring The name of the symbol for circle, as written on the map database.
mouseClickfunction The user defined function that is called when the circle is clicked.
zindexint 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.
- Source:
-
addCollapsibleMapDecoration(title, width, height, state)
-
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:
Name Type Description titlestring Title of the decoration.
widthint The width of map decoration in pixels.
heightint The height of map decoration in pixels.
stateint The Anchor of map decoration. (Default parameter is 4)
- Source:
-
addCustomMarker(id, latitude, longitude, name, mouseClick, zindex)
-
Add a marker pointing to a specified point.
Any image can be used as a marker.
Parameters:
Name Type Description idstring Id of the marker.
latitudefloat The latitude value of the point.
longitudefloat The longitude value of the point.
namestring Name of the marker.
mouseClickfunction The user defined function that is called when the marker is clicked.
zindexint 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.
- Source:
-
addDistanceMeasuringTool()
-
Add a distance measuring tool to the map.
- Source:
-
addEarthquakes(mouseClick)
-
Add Earthquakes to the map.
Parameters:
Name Type Description mouseClickfunction The user defined function that is called when layer is clicked.
- Source:
-
addGoogleTileLayer(googleKey, hybrid)
-
Add Google tile layer.
Parameters:
Name Type Description googleKeystring The key for Bing service.
hybridboolean Default: false (Satelite) true: Hybrid.
- Source:
-
addImageLayer()
-
Add image layer to map.
- Source:
-
addLabelToMarker(id, html, textMarker)
-
Add a label to a specified marker.
Parameters:
Name Type Description idstring Id of the marker.
htmlstring The html content of the label.
textMarkerstring The textMarker content of the label.
- Source:
-
addLine(id, ordinates, name, sym, mouseClick, zindex, acStyle)
-
Add a line specified by array of coordinates.
Parameters:
Name Type Description idstring Id of the line object.
ordinatesarray The set of coordinates.
namestring Name of the line object.
symstring The name of the style object for line, as in the map database or created by user (@See createColorStyle).
mouseClickfunction The user defined function that is called when the line is clicked.
zindexint 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.
acStyleobject Animation color style can create using mapper.createAnimationColorStyle() method
- Source:
-
addMapDecoration(html, offsetX, offsetY, width, height, collapsible, draggable, title, titleStyle, contentStyle, mouseClick)
-
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.
Map decoration can be used as a collapsible window (@link addCollapsibleMapDecoration)
so that it can be minimized by the user.Parameters:
Name Type Description htmlstring An HTML content string that is going to be displayed inside the map decoration.
offsetXint In pixels to the dock icon.
offsetYint In pixels to the dock icon.
widthint The width of map decoration in pixels.
heightint The height of map decoration in pixels.
collapsibleboolean Defines the collapsible value true or false.
draggableboolean True if draggable, false if fixed.
titlestring The title of the decoration.
titleStyleobject A CSS definition for the Decoration title style. For example:
titleStyle:{border-style:solid,
border-color:#391EA6,
border-width:1px,
backgroundColor:#0D0D0D,
font-size:18px,
font-weight:bold,
color:#FDFDFD}contentStyleobject A CSS definition for the Decoration content style. For example:
contentStyle: {border-style:solid,
border-color:#101418,
border-width:2px,
padding:0px,
font-size:16px,
color:#000000,
backgroundColor:#FDFDFD}mouseClickfunction The function for mouse click event.
- Source:
-
addMapMarker(id, latitude, longitude, markerStyle, labelText, labelStyle, labelTextStyle, draggable, mouseClick, zindex)
-
Add a mapMarker to a specified point with special features
.Parameters:
Name Type Description idstring Id of the marker.
latitudefloat The latitude value of the point.
longitudefloat The longitude value of the point.
markerStyleobject The style object of mapMarker.
labelTextstring Text of mapMarker label.
labelStyleobject The style object of mapMarker label.
labelTextStyleobject The text style object of mapMarker label text.
draggableboolean Set draggable mapMarker.
mouseClickfunction The user defined function that is called when the marker is clicked.
zindexint 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.
- Source:
-
addMarker(id, latitude, longitude, name, sym, w, h, mouseClick, zindex)
-
Add a marker pointing to a specified point.
Parameters:
Name Type Description idstring Id of the marker.
latitudefloat The latitude value of the point.
longitudefloat The longitude value of the point.
namestring Name of the marker.
symstring The name of the style object for marker, as in the map database or created by user. (@See createColorStyle)
wint The width of marker symbol in pixels.
hint The height of marker symbol in pixels.
mouseClickfunction The user defined function that is called when the marker is clicked.
zindexint 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.
- Source:
-
addNavigationPanel(place, backgroundColor, buttonColor, fontSize, infoTips, orientation, style)
-
Add navigation panel to the map.
Parameters:
Name Type Description placeint Location of the navigation panel. Can be one of 6 pre-defined options.1--upper left,2--upper center,3--upper right,4--lower left,5--lower center,6--lower right.
backgroundColorstring The background color for the panel. Specified as #rrggbb, e.g. "#d3d3d3".
buttonColorstring The background color for the buttons. Specified as #rrggbb, e.g. "#d3d3d3".
fontSizeinteger The font size in panel texts.
infoTipsobject E.G. {zoomLevel01:"level01Name",zoomLevel02:"level02Name", ...}.
orientationinteger Orientation of navigationbar default 1.
stylestring Specifies the display mode of NavigationPanelBar, Can be one of four pre-defined options. 1--display all, 2--slide bar and zoom buttons only, 3--zoom buttons only, 4--navigation panel only.
- Source:
-
addPharmacyOnDuty()
-
Add pharmacy on duty layer to the map.
- Source:
-
addPoiList(id, poiList, mouseClick)
-
Add poi list to the map.
Parameters:
Name Type Description idstring The id of POI list.
poiListarray The list of POIs.
mouseClickfunction The user defined function that is called when layer is clicked.
- Source:
-
addRegion(id, ordinates, name, sym, mouseClick, zindex)
-
Add a region as a polygon specified by array of coordinates.
Parameters:
Name Type Description idstring Id of the polygon object.
ordinatesarray The set of coordinates.
namestring Name of the polygon object.
symstring Name of the style object for polygon, as in the map database or created by user. (@See createColorStyle)
mouseClickfunction The user defined function that is called when the region is clicked.
zindexint 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.
- Source:
-
addRoute(id, pathIds, themeName, mouseClick)
-
Add an existing route path to the map.
Parameters:
Name Type Description idstring Id of the route object.
pathIdsint The id of the existing path (See http://www.locationbox.com.tr/web/api_route.jsp).
themeNamestring Name of the theme.
mouseClickfunction The user defined function that is called when layer is clicked.
- Source:
-
addScaleBar(format, anchorPosition, fontSize, fontColor, fontWeight, scaleBarColor, boxShadow, maxLength)
-
Add scale bar to the map.
Parameters:
Name Type Description formatstring Specifies the display format (or mode) of ScaleBar, can be one of three pre-defined options; "BOTH", "METRIC", or "IMPERIAL".
anchorPositionint Specifies where thw scalebar is placed. Can be one of 6 pre-defined options: 1--upper left,2--upper center,3--upper right,4--lower left,5--lower center,6--lower right.
fontSizeint The font size in points.
fontColorstring The color for the scale bar text. Specified as #rrggbb e.g. "#cccccc".
fontWeightint The font weight.
scaleBarColorstring The color for the scale bar.
boxShadowstring The shadow of the scale bar e.g "1px 1px 5px #000000".
maxLengthint The maximum length of the scale bar in pixels.
- Source:
-
addSocialEvents()
-
Add social events to the map.
- Source:
-
addText(id, latitude, longitude, content, fontFamily, fontStyle, fontWeight, color, fontSize, sizeUnit)
-
Add a text feature to a specified layer.
Parameters:
Name Type Description idint Id of the feature.
latitudefloat The latitude value of the point that info window going to be displayed.
longitudefloat The longitude value of the point that info window going to be displayed.
contentstring The content of text feature.
fontFamilystring Specifies the font family to be used to render the text.
fontStylestring Specifies the style (italic or normal) of the font used to render the text.It should be one of two static values: OM.Text.FONTSTYLE_ITALIC or OM.Text.FONTSTYLE_NORMAL.
fontWeightstring Specifies the font weight (bold or normal) used to render the text. It should be one of two static values: OM.Text.FONTWEIGHT_BOLD or OM.Text.FONTWEIGHT_NORMAL.
colorstring Specifies the font color. Format is "#rrggbb".
fontSizestring Specifies the font size.
sizeUnitstring Specifies the font size unit. The value can be "pixel", "meter", "kilometer", "feet", "mile". Default value is "pixel".
- Source:
-
addTileLayer(basemap)
-
Parameters:
Name Type Description basemapstring Add a TileLayer to the map.
- Source:
-
addTrafficEvents()
-
Add the traffic event data on the map.
- Source:
-
addTrafficTmc(tmcKodList)
-
Add the visualized traffic data on the map.
Parameters:
Name Type Description tmcKodListarray The array of TMC code list.
- Source:
-
addWeatherReport(mouseClick)
-
Add weather report layer to the map.
Parameters:
Name Type Description mouseClickfunction The user defined function that is called when layer is clicked.
- Source:
-
addYolList(id, yolList)
-
Add yol list to the map.
Parameters:
Name Type Description idstring Id of YolList.
yolListarray YolID list.
- Source:
-
animateMarker(id, Ordinates, interval, loop, time, bounce)
-
Move a marker to a specified position or visit a set of positions.
Parameters:
Name Type Description idstring Id of the marker.
Ordinatesarray The set of coordinates.
intervalint Interval affects the marker moving speed. The default value is 100. A larger value results in a slower movement.
loopboolean Loop affects activate true or false (default:true).
timeint Time for animation (default:1000ms).
bounceboolean Bounce affects true or false (default:true).
- Source:
-
animateMarkerFlow(tmcKod, interval, sym, width, height, repeat, factor, reverse)
-
Animates the marker flow according to TMC code geometries.
Parameters:
Name Type Description tmcKodstring TMC code.
intervalint Interval affects the marker moving speed. The default value is 100. A larger value results in a slower movement.
symstring The name of the style object for marker, as in the map database or created by user.
widthint The width of marker symbol in pixels.
heightint The height of marker symbol in pixels.
repeatboolean Animation repeats (true) or not.
factorstring The interval between repeat time duration.
reverseboolean Reversed ordinates.
- Source:
-
clearCircleTool()
-
Clear the circle tool.
- Source:
-
clearDistanceMeasuringTool()
-
Clear distance measuring tool.
- Source:
-
clearMapListener(event, callback)
-
Clear map listener from the map.
Parameters:
Name Type Description eventstring Name of the event being listened. (See EventListener for the events.)
callbackfunction The user defined function that is called when a map event is fired.
- Source:
-
clearMarkerListener(id, event, callback)
-
Set marker listener.
Parameters:
Name Type Description idstring Id of the marker.
eventobject Types of events.
IMapper.MARKER_MOUSE_CLICK
IMapper.MARKER_MOUSE_OVER
IMapper.MARKER_MOUSE_OUT
IMapper.MARKER_MOUSE_RIGHT_CLICKcallbackfunction The user defined function that is called when marker is set.
- Source:
-
clearMeasureTool()
-
Clear the Measure Tool.
- Source:
-
clearPolygonTool()
-
Cleayer Polygon Tool if exist.
- Source:
-
clearRectangleTool()
-
Clear the Rectangle Tool.
- Source:
-
clearRedlineTool()
-
Clear the Red Line Tool.
- Source:
-
createAdvancedStyle(name, symlist)
-
Create an advanced style object.
Parameters:
Name Type Description namestring Name of the style.
symliststring List of styles in JSON format.
- Source:
Returns:
Style object containing list of style objects.
- Type
- object
-
createAllFilter(filterArray)
-
This is a combination filter that combines (ANDs) a list of Filter instances. A feature passes this filter only if it passes all the filters in the list.
Parameters:
Name Type Description filterArrayobject An array of OM.filter.Filter instances can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.All object
- Type
- object
-
createAndFilter(filter1, filter2)
-
This is a composite filter based on the logical AND of two filters.
Parameters:
Name Type Description filter1object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
filter2object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.And object
- Type
- object
-
createAnimationColorStyle(colorFirst, colorSecond, duration, enableMovingDashLine)
-
This method represents animation style.
Parameters:
Name Type Description colorFirstobject Begin color style.
colorSecondobject End color style.
durationint Animation duration. Default value is 5 seconds.
enableMovingDashLineboolean Enable dash line moving effect. This effect is only for SVG mode.
- Source:
Returns:
AnimationColor object.
- Type
- object
-
createAnyFilter(filterArray)
-
This is a combination filter that combines (ANDs) a list of Filter instances. A feature passes this filter only if it passes all the filters in the list.
Parameters:
Name Type Description filterArrayobject An array of OM.filter.Filter instances can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.Any object
- Type
- object
-
createAnyInteractFilter(geom)
-
This is a spatial filter that implements the any-interact relationship. A feature passes this filter if its geometry has any interaction (i.e. is not disjoint) with the filter's geometry.
Parameters:
Name Type Description geomobject The filtering geometry.
- Source:
Returns:
new OM.filter.AnyInteract object
- Type
- object
-
createBar(data, color)
-
This method create a bar with spesific data and its color.
Parameters:
Name Type Description datastring Bar data name.
colorstring The color of the bar data. The string format is "#RRGGBB".
- Source:
Returns:
Bar object.
- Type
- object
-
createBarChartStyle(styleName, bars, width, height, lengthUnit, enableHighlight, lengthPixelRange)
-
This method represents a bar chart style. Each instance will render the specified attribute values of a feature as a bar chart at that feature's centroid.
Parameters:
Name Type Description styleNamestring A name for this style instance, e.g. 'salesByRegion'.
barsarray An array of OM.style.Bar. Each bar represents an attribute value.
widthint The bar chart width. Default value is 100 (in lengthUnit whose default is pixels).
heightint The bar chart height. Default value is 100 (in lengthUnit whose default is pixels).
lengthUnitstring The unit of the chart size, it must be "pixel" or "kilometer"; the default unit is pixel.
enableHighlightboolean If true, highlight a slice on mouse over. The default value is false.
lengthPixelRangeobject Specifies the length range of bar chart in pixels when the length unit is kilometer. It has two integer attributes: max and min. They control the height and width range for the bar chart.
max {int} Maximum height in pixels.
min {int} Minimum height in pixels.- Source:
Returns:
Barchart object.
- Type
- object
-
createBetweenFilter(filterAttribute, low, high)
-
This is a filter class that evaluates a feature to check if the specified attribute value falls within a numeric range.
A value passes this filter if it is greater than or equal to the low value and smaller than or equal to the high value.
i.e. the value of expr1 BETWEEN expr 2 and expr3 is the value of
the boolean expression: expr2 <= expr1 AND expr1 <= expr3.Parameters:
Name Type Description filterAttributestring The name of the feature attribute to be evaluated.
lowfloat Minimum value (inclusive).
highfloat Maximum value (inclusive).
- Source:
Returns:
new OM.filter.Between object
- Type
- object
-
createBucketStyle(name, styles, buckets, classification, numClasses, gradient)
-
This method represents a bucket style that can be used for thematic mapping of numeric or categorical data.
Parameters:
Name Type Description namestring Name of the style.
stylesarray An array that corresponds to the array of buckets.
That is, style[0] is used for buckets[0] (*Required).bucketsarray An array of OM.style.Bucket. Must be of the same length as the styles array (*Optional).
classificationstring The classification scheme. Can be "equal", "logarithmic" or "custom" (*Optional).
numClassesint The number of classes or buckets (*Required).
gradientstring Whether a gradient effect should be used on all buckets.
The value can be "linear", "on", or "off". Default is "off" (*Optional).- Source:
Returns:
Style object containing list of style objects.
- Type
- object
-
createCollectionBucket(values, dataType, keepWhiteSpace)
-
Creates a collection bucket.
Parameters:
Name Type Description valuesarray The value list for this collection bucket.
dataTypestring The data type for the values. Default is "string".
keepWhiteSpaceboolean Whether to keep white spaces in the values. Default is "false".
- Source:
Returns:
CollectionBucket object.
- Type
- object
-
createColorScheme(name, numClasses, classification, defaultStyle, styles, buckets, baseColor, toColor, fromColor, stroke, baseColorOpacity, strokeOpacity)
-
Creates a color scheme.
Parameters:
Name Type Description namestring A style name.
numClassesint The number of buckets, only used when generating equal-range buckets.
classificationstring The value can be "equal" or "custom". If it's "equal", all buckets are generated automatically.
defaultStyleobject The default style. Used when a feature's attribute value does not fall within any bucket.
stylesarray An array of custom color styles (OM.style.Color) to be used as color stops; if not specified, the color stops will be auto-generated based on the baseColor or fromColor and toColor.
bucketsarray The buckets array. Each element in the array is a OM.style.Bucket.
baseColorstring The base fill color string for each bucket. Format is "#rrggbb".
toColorstring The toColor (or final color) for a multi-hue color scheme. Format is "#rrggbb".
fromColorstring The fromColor (or initial color) for a multi-hue color scheme. Format is "#rrggbb".
strokestring The stroke color. Format is "#rrggbb".
baseColorOpacityint Base color opacity.
strokeOpacityint Border color opacity.
- Source:
Returns:
Style ColorScheme object.
- Type
- object
-
createColorStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth)
-
Create a style object.
Parameters:
Name Type Description namestring Name of the style.
fillColorstring Filling color. A string in the format of "RRGGBB", or null if no filling.
fillOpacityint Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderColorstring Border color. A string in the format of "RRGGBB".
borderOpacityint Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderWidthint Border width in device point/pixel unit. Default is 1.
- Source:
Returns:
Style Color object.
- Type
- object
-
createDropShadowStyle(opacity, color, offset, radius)
-
This method represents a shadow filter that can be applied to vector layers.
Parameters:
Name Type Description opacityint The opacity of the shadow. A number between 0 and 1.
colorstring The color of the shadow. The string format is "#RRGGBB""
offsetint The offset between the casted shadow and the object (in pixels).
radiusint Defines how hazy, or how blurry, the drop shadow is. Default value is "2".
- Source:
Returns:
Drop Shadow object.
- Type
- object
-
createFilter(filterType, attrName, filterValue)
-
Create Spatial Filter.
Parameters:
Name Type Description filterTypeobject Types of events.
IMapper.FILTER_EQUALS
IMapper.FILTER_NOTEQUALS
IMapper.FILTER_GREATER
IMapper.FILTER_GREATEREQUALS
IMapper.FILTER_LESS
IMapper.FILTER_LESSEQUALS
IMapper.FILTER_ISNULL
IMapper.FILTER_ISNOTNULL
IMapper.FILTER_INattrNamestring The name of the feature attribute to be filtered.
filterValuestring The filtering attribute value.
- Source:
Returns:
Filter object
- Type
- object
-
createGrowStyle(opacity, color, offset, radius)
-
This method represents a glow filter that can be applied to vector layers.
Parameters:
Name Type Description opacityint The opacity of the glow. A number between 0 and 1.
colorstring The color of the glow. The string format is "#RRGGBB"
offsetint The offset between the casted glow and the object (in pixels).
radiusint Defines how hazy, or how blurry, the drop shadow is. Default value is "2".
- Source:
Returns:
Glow object.
- Type
- object
-
createIconMarkerStyle(name, url, width, height)
-
Create an icon marker style object.
Parameters:
Name Type Description namestring Name of the style.
urlstring Marker image url.
widthint Marker width in pixels.
heightint Marker width in pixels.
- Source:
Returns:
Style Marker object
- Type
- object
-
createInsideCircleFilter()
-
This is a filter class that tests if a feature's geometry is inside the specified filter polygon.
- Source:
Returns:
new OM.filter.InsidePolygon object
- Type
- object
-
createInsideRectangleFilter()
-
This is a filter class that tests if a feature's geometry is inside the specified filter rectangle.
- Source:
Returns:
new OM.filter.InsidePolygon object
- Type
- object
-
createLayerControl(anchorPosition, offsetX, offsetY, contentStyle, titleStyle, layerDeleteEnable)
-
Create Text Style.
Parameters:
Name Type Description anchorPositionint Specify where a collapsed layer control will be docked,as well as where the docker icon is positioned.
A set of 6 predefined positions for the panel.
The 6 values are: 1--upper left,2--upper center,3--upper right,4--lower left,5--lower center,6--lower right.offsetXint In pixels to the dock icon.
offsetYint In pixels to the dock icon.
contentStyleobject Specifies the minimum width and maximum height of the panel, and the font used to display the layer names. This object has the following attributes:
minWidth {int} The minimum width of the panel (in pixels).
maxHeight {int} The maximum height of the panel (in pixels).
font_size {int} Font size in points.
font_family {String} Font family name (e.g. Arial).titleStyleobject Specify the font to use for the title text. This object has the folowing attributes:
font_size {int} Font size in points.
font_family {String} Font family name (e.g. Arial).layerDeleteEnableboolean The delete icon will show up when a vector is highlighted. The default value is "false".
- Source:
Returns:
Layer Control object.
- Type
- object
-
createLikeFilter(filterAtrribute, filterValue)
-
This is a filter class that implements the "Like" filter similar to the SQL like clause.
Parameters:
Name Type Description filterAtrributestring The name of the feature attribute to be tested.
filterValuestring The filtering attribute value.
- Source:
Returns:
new OM.filter.Like object
- Type
- object
-
createLinearGradient(stops, x1, y1, x2, y2, stroke)
-
This method defines a linear color gradient.
A linear color gradient fills an area with a color fill that varies from one color to another.
The color varies along a linear axis and all points along a line perpendicular to the axis have the same color.
The color variation is determined by the color stops. A color stop specifies a position along the axis and the colors
at that position. Color values between color stops are interpolated.
The axis is defined by two points on a unit square (i.e. x and y are between 0 and 1) and hence
can be horizontal, vertical, or at an angle (angular).
The x and y values can range from (0,0) to (1,1), where (0,0) is the top left and (1,1) is the bottom right.
The offset for a color stop is the offset along the axis and is a value between 0 (the start) and 1 (the end).
The gradient is a horizontal gradient if y1 = y2 and x1 <> x2.
The gradient is a vertical gradient if x1 = x2 and y1 <> y2 differ.
The gradient is an angular gradient if x1 <> x2 and y1 <> y2.
The gradient is an angular gradient if x1 <> x2 and y1 <> y2.Parameters:
Name Type Description stopsarray The color stops of the gradient. The color stops are specified by an array of color stop objects Each color stop object has two properties, offset and color,
which specify the stop offset and color respectively. The stop offset is a number between 0
and 1. It specifies the location of the color stop relative to the start point of the gradient.
0 indicates the gradient start point and 1 indicates the gradient end point.
The color is specified by rgba values ("#rrggbbaa)".
Example of a stops array: [{offset:0, color:"#ffffffff"}, {offset:1, color:"#ff0000ff"}]x1float The X ordinate of the gradient's start point. Must be a number between 0 and 1, where 0 indicates the left border of the gradient coordinate system.
y1float The Y ordinate of the gradient's start point. Must be a number between 0 and 1, where 0 indicates the top border of the gradient coordinate system.
x2float The X ordinate of the gradient's end point. Must be a number between 0 and 1, where 0 indicates the left border of the gradient coordinate system.
y2float The Y ordinate of the gradient's end point. Must be a number between 0 and 1, where 0 indicates the top border of the gradient coordinate system.
strokestring The stroke color. The string format is "#RRGGBB".
- Source:
Returns:
Linear Gradient object.
- Type
- object
-
createMarkerStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth, width, height, lengthUnit, type, cx, cy, shapeWidth, shapeHeight)
-
Create a marker style object.
Parameters:
Name Type Description namestring Name of the style.
fillColorstring Filling color. A string in the format of "RRGGBB", or null if no filling.
fillOpacityint Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderColorstring Border color. A string in the format of "RRGGBB".
borderOpacityint Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderWidthint Border width in device point/pixel unit. Default is 1.
widthint Marker width in pixels.
heightint Marker height in pixels.
lengthUnitstring The size unit. Optional.The value can be "pixel", "meter", "kilometer", "feet", or "mile". Default value is "pixel".
typestring The type of the vector shape. Valid values are "circle", "path" or "rectangle".
cxfloat The circle's center X ordinate. For "circle" only.
cyfloat The circle's center Y ordinate. For "circle" only.
shapeWidthint The width. Valid for shape types "circle" and "rectangle" only.
shapeHeightint The height. Valid for shape types "circle" and "rectangle" only.
- Source:
Returns:
Style object
- Type
- object
-
createNotFilter(filter)
-
This is a filter class that implements the "NOT" logic. It returns true if a feature does not pass the specified filter.
Parameters:
Name Type Description filterobject An OM.filter.Filter instance can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.Not object
- Type
- object
-
createOrFilter(filter1, filter2)
-
This is a combo filter that implements the logical "OR" operation of two filters.
Parameters:
Name Type Description filter1object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
filter2object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.Or object
- Type
- object
-
createPieChartStyle(styleName, slices, enableHighlight, startingAngle, direction, lengthUnit, radiusPixelRange)
-
This method represents a Pie chart style.
Parameters:
Name Type Description styleNamestring A name for this style instance, e.g. 'salesByRegion'.
slicesarray An array.of OM.style.PieSlice.
enableHighlightboolean If true, highlight a slice on mouse over. The default value is false.
startingAngleint Angle of the first pie slice center. default value is 0.
directionstring The direction of slices. Value can be "CW" (clockwise) or "CCW" (counter clockwise).Default value is "CCW".
lengthUnitstring The unit of the chart radius. Value can be "pixel" or "kilometer". The default is pixel.
radiusPixelRangeobject Specifies the radius range of pie chart by pixel. Used only when length unit is kilometer.The object has two attributes, min and max, both integers with minimum and maximum chart size in pixels.
- Source:
Returns:
Piechart object.
- Type
- object
-
createPieSlice(data, color)
-
This method create a pie with spesific data and its color.
Parameters:
Name Type Description datastring Pie data name.
colorstring The color of the bar data. The string format is "#RRGGBB".
- Source:
Returns:
Pie Slice object.
- Type
- object
-
createPulseAnimation(stroke, duration, beginSize, endSize)
-
This method represents the pulse animation style for point feature.
Parameters:
Name Type Description strokestring The stroke color string as "#RRGGBB".
durationint The animation duration. Default value is 5 seconds.
beginSizeint Begin marker size in pixels.
endSizeint End marker size in pixels.
- Source:
Returns:
Pulse object.
- Type
- object
-
createRadialGradient(stops, cy, cx, radius, stroke)
-
This method defines a radial color gradient.
Parameters:
Name Type Description stopsarray The color stops of the gradient. The color stops are specified by an array of color stop objects. Each color stop object has two properties, offset and color,
which specify the stop offset and color respectively. The stop offset is a number between 0 and 1. It specifies the location of the color stop relative to the start point of the gradient.
0 indicates the gradient start point and 1 indicates the gradient end point. The color is expressed as "#rrggbbaa".
Example of a stops array: [{offset:0, color:"#ffffffff"}, {offset:1, color:"#ff0000ff"}]cyfloat The X offset of the gradient's center point. Must be a number between 0 and 1, where 0 indicates the left border of the gradient coordinate system.
cxfloat The Y offset of the gradient's center point. Must be a number between 0 and 1, where 0 indicates the top border of the gradient coordinate system.
radiusfloat The radius of the gradient. The radius must be a number between 0 and 1.
strokestring The stroke color. The string format is "#RRGGBB".
- Source:
Returns:
Radial Gradient object.
- Type
- object
-
createRangedBucket(seq, low, high)
-
Creates a ranged bucket.
Parameters:
Name Type Description seqint The sequence number.
lowfloat The low value for this range.
highfloat The high value for this range.
- Source:
Returns:
RangedBucket object.
- Type
- object
-
createTextStyle(name, color, fontStyle, fontFamily, fontSize, sizeUnit, fontWeight)
-
Create Text Style.
Parameters:
Name Type Description namestring The style name.
colorstring Sepcifies the font color. Format is "#rrggbb".
fontStylestring Specifies the style (italic or normal) of the font used to render the text.It should be one of two static values: OM.Text.FONTSTYLE_ITALIC or OM.Text.FONTSTYLE_NORMAL.
fontFamilystring Specifies the font family to be used to render the text.
fontSizeint Specifies the font size.
sizeUnitstring Specifies the font size unit. The value can be "pixel", "meter","kilometer", "feet", "mile". Default value is "pixel".
fontWeightint The font weight.
- Source:
Returns:
Text Style object.
- Type
- object
-
createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height)
-
Create VariableMarker Style.
Parameters:
Name Type Description classificationstring The classification scheme. Can be "equal", "logarithmic", or "custom". If it's
"equal" or "logarithmic", all buckets are generated automatically. If it's custom, then the supplied function
is invoked to generate the buckets.colorstring The fill color in rgb, i.e. in the format "#rrggbb".
strokestring The stroke color in rgb, i.e. in the format "#rrggbb".
typestring The type of the vector shape. Valid values are "circle", "path" or "rectangle".
textStyleobject The text style will apply to the text on marker feature. use mapper. createTextStyle function.
startSizeinteger The initial width/height of the marker.
incrementinteger The increment width/height for each bucket.
numClassesinteger The number of buckets. Only used when the classification scheme is "equal" or "logarithmic" and hence the buckets are automatically generated.
cxinteger The initial x coor vector shape of the marker.
cyinteger The initial y coor vector shape of the marker.
widthinteger The initial width vector shape of the marker.
heightinteger The initial height vector shape of the marker.
- Source:
Returns:
Text Style object with vectorDef.
- Type
- object
-
createVectorMarkerStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth, width, height, vector)
-
Create a vector marker style object.
Parameters:
Name Type Description namestring Name of the style.
fillColorstring Filling color. A string in the format of "RRGGBB", or null if no filling.
fillOpacityint Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderColorstring Border color. A string in the format of "RRGGBB".
borderOpacityint Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255.
borderWidthint Border width in device point/pixel unit. Default is 1.
widthint Marker width in pixels.
heightint Marker height in pixels.
vectorobject 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".- Source:
Returns:
Marker object
- Type
- object
-
createXorFilter(filter1, filter2)
-
This is a combo-filter class that implements the logical "XOR" operation of two filters.
Parameters:
Name Type Description filter1object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
filter2object An instance of OM.filter.Filter can create with mapper.createFilter(filterType, attrName, filterValue).
- Source:
Returns:
new OM.filter.Xor object
- Type
- object
-
displayInfoWindow(latitude, longitude, html, width, height, title, parameters)
-
Display an info window at specified latitude/longitude.
Parameters:
Name Type Description latitudefloat The latitude value of the point that info window going to be displayed.
longitudefloat The longitude value of the point that info window going to be displayed.
htmlstring An HTML content string that is going to be displayed inside the info window.
widthint The width of the info window in pixels.
heightint The height of the info window in pixels.
titlestring A string that is going to be displayed at the header of the info window.
parametersobject The object that specifies the custom style parameters, which are effective only when the info window style is "MVInfoWindowStyle1".
- Source:
-
enableLoadingIcon()
-
Enables to loading icon.
- Source:
-
enableMouseWheelZooming(wheelZooming)
-
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:
Name Type Description wheelZoomingboolean A boolean that specifies whether to enable mouse wheel zooming (Default: true).
- Source:
-
getCenterLat()
-
Get center latitude.
- Source:
Returns:
(double) Y point.
-
getCenterLon()
-
Get center longitude.
- Source:
Returns:
(double) X point.
-
getCircleData()
-
Get radius and center coordinates of the circle drawn by the circle tool.
- Source:
Returns:
Radius and center coordinates of the circle drawn by the circle tool.
-
getCirclePolygonOrdinates()
-
This method returns the ordinates object that specifies a polygon that proximates the circle on the map.
- Source:
Returns:
ordinates obj
-
getGeolocation(callback)
-
Get the location of user.
Parameters:
Name Type Description callbackfunction Callback function.
- Source:
-
getMapClickPosition()
-
Get the coordinates of point clicked on map.
- Source:
Returns:
The map click position.
-
getMapCoordinates(x, y)
-
Display an info window at specified latitude/longitude.
Parameters:
Name Type Description xnumber The X ordinate in screen pixels.
ynumber The Y ordinate in screen pixels.
- Source:
Returns:
- Type
- object
-
getMapRectangle()
-
Get coordinates of the bounding box of the map window.
- Source:
Returns:
Maps coordinates of object array.
-
getMarker(id)
-
Get a specified marker.
Parameters:
Name Type Description idstring Id of the marker.
- Source:
Returns:
Marker Object.
- Type
- object
-
getMaxZoomLevel()
-
Get maximum zoom level.
- Source:
Returns:
(int) Max zoom level.
-
getMouseLocation()
-
Get coordinates of the location that mouse points.
- Source:
Returns:
Mouse Location (x,y).
-
getPolygonOrdinates()
-
Get polygon ordinates.
- Source:
Returns:
The list of polygon ordinates.
- Type
- array
-
getRectangleOrdinates()
-
Clear the Rectangle Tool.
- Source:
-
getRedlineOrdinates()
-
Get an array of ordinates of the shape drawn with the red line tool.
- Source:
Returns:
Ordinates of the shape drawn.
-
getScreenLocation(x, y)
-
Get the screen location for the specified ground coordinate.
Parameters:
Name Type Description xdouble X coordinate.
ydouble Y coordinate.
- Source:
Returns:
x and y members.
-
getZoomLevel()
-
Get zoom level.
- Source:
Returns:
(int) Zoom level.
-
hideTrafficView()
-
Hide the visualized traffic data on the map.
- Source:
-
initMap(mapCenterLat, mapCenterLon, mapZoom, pBaseMap, pUrlBase, mapDiv)
-
Initialize the IMapper object.
Parameters:
Name Type Description mapCenterLatint The latitude value of center coordinate of the map.
mapCenterLonint The longitude value of center coordinate of the map.
mapZoomint Initial zoom level of map (1-16).
pBaseMapint Name of the basemap. Three types of basemap is defined in LocationBox.
IMapper.BASEMAP_TILELAYER Simple basemap displaying limited administrative data. (cities, borders)
IMapper.BASEMAP_TILELAYER_NOLOGO Basemap showing POIs represented by their own logos.
If basemap is not specified, default basemap is BASEMAP_TILELAYER.pUrlBaseint Url of the map server. If url base is not specified, default url base is http://maplink.infotech.com.tr/mapviewer.
mapDivint The div to set the map. If it is null or not specified then it is set as "map".
- Source:
Returns:
map object
- Type
- object
-
initMapWithExtent(minLat, minLon, maxLat, maxLon, pBaseMap, pUrlBase, mapDiv)
-
Initialize the IMapper object with given extent coordinates.
Parameters:
Name Type Description minLatdouble The minimum latitude extent of the map.
minLondouble The minimum longitude extent of the map.
maxLatdouble The maximum latitude extent of the map.
maxLondouble The maximum longitude extent of the map.
pBaseMapstring 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.pUrlBasestring Url of the map server.
If url base is not specified, default url base is http://www.locationbox.com.tr/mapviewer.mapDivstring The div to set the map. If it is null or not specified then it is set as "map".
- Source:
Returns:
map object.
- Type
- object
-
moveMarker(id, latitude, longitude, zindex)
-
Update the marker with given id and set latitude, longitude and z-index values to that marker.
Parameters:
Name Type Description idstring Id of the marker.
latitudefloat The latitude value of the point.
longitudefloat The longitude value of the point.
zindexint 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.
- Source:
-
mvAfterZoom()
-
Adds Traffic Theme if not exist.
- Source:
-
mvBeforeZoom()
-
Removes Traffic Theme if exist.
- Source:
-
pan(offX, offY)
-
Pan (move) the map by the specified X and Y offset.
Parameters:
Name Type Description offXnumber The X offset in screen pixels.
offYnumber The Y offset in screen pixels.
- Source:
-
print(callback)
-
Print the map being viewed.
Parameters:
Name Type Description callbackfunction 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.
- Source:
-
removeBingTileLayer()
-
Remove Bing Tile Layer from the map.
- Source:
-
removeEarthquakes()
-
Remove Earthquakes to the map.
- Source:
-
removeFeature(id)
-
Remove an added feature by specifying its id.
Parameters:
Name Type Description idstring Id of the feature.
- Source:
-
removeGoogleTileLayer()
-
Remove Google Tile Layer from the map.
- Source:
-
removeImageLayer()
-
Remove image layer from map.
- Source:
-
removeInfoWindow()
-
Remove the existing info window.
- Source:
-
removeLabelFromMarker(id)
-
Remove the label from a specified marker.
Parameters:
Name Type Description idstring Id of the marker.
- Source:
-
removeMapDecoration()
-
Remove the map decoration by specifying its id.
- Source:
-
removePharmacyOnDuty()
-
Remove pharmacy on duty layer from the map.
- Source:
-
removePoiList(id)
-
Remove poi list from the map.
Parameters:
Name Type Description idstring The id of POI list.
- Source:
-
removeRoute(id)
-
Remove an existing route path from the map.
Parameters:
Name Type Description idstring Id of the route object.
- Source:
-
removeSocialEvents()
-
Remove social events from the map.
- Source:
-
removeTileLayer(tileLayer)
-
Parameters:
Name Type Description tileLayerstring Remove a specified TileLayer from the map. The layer-deleted event will be fired.
- Source:
-
removeToolFeature(id)
-
Registers that feature is removed.
Parameters:
Name Type Description idkey Feature key.
- Source:
Returns:
an edit change event object (EditChangeEvent).
- Type
- object
-
removeTrafficEvents()
-
Remove the traffic event data from the map.
- Source:
-
removeTrafficTmc()
-
Remove Traffic TMC from the map
- Source:
-
removeWeatherReport()
-
Remove weather report layer from the map.
- Source:
-
removeYolList(id)
-
Remove yol list to the map.
Parameters:
Name Type Description idstring Id of YolList.
- Source:
-
setCircleTool(getCircle, getDragEvent)
-
Initialize the circle tool.
Parameters:
Name Type Description getCirclefunction The user defined function that is called when a map event is fired.
getDragEventfunction The user defined function that is called when a map event is fired.
- Source:
-
setMapListener(event, callback)
-
Initialize map listener.
Parameters:
Name Type Description eventstring Name of the event being listened.
callbackfunction The user defined function that is called when a map event is fired.
- Source:
-
setMarkerListener(id, event, callback)
-
Set marker listener.
Parameters:
Name Type Description idstring Id of the marker.
eventobject Types of events.
IMapper.MARKER_MOUSE_CLICK
IMapper.MARKER_MOUSE_OVER
IMapper.MARKER_MOUSE_OUT
IMapper.MARKER_MOUSE_RIGHT_CLICKcallbackfunction The user defined function that is called when marker is set.
- Source:
-
setMarkerVisible(id, visible)
-
Set Marker Visible.
Parameters:
Name Type Description idint The id of marker.
visibleboolean Visibility of the marker.
- Source:
-
setMeasureTool(getNewPoint, getNewLine, finishMode, simplified)
-
This is a sub class of OM.tool.Tool that can be used to draw arbitrary shape(s) on the map. It is similar to the traditional red-lining function.
Parameters:
Name Type Description getNewPointobject callback for OM.event.ToolEvent.REDLINE_POINT_CREATE listener.
getNewLineobject callback for OM.event.ToolEvent.TOOL_END listener.
finishModeboolean default is OM.tool.Redline.FINISH_ON_CLICK, meaning you must click on the initial polygon vertex once to finish/complete the tool's drawing operation. If set to OM.tool.Redline.FINISH_ON_RELEASE, then
the tool will complete the drawing on the very first mouse-up.simplifiedboolean default is true. true: simplify the result of the redline; false: not simplify the result of redline.
- Source:
-
setPolygonOrdinates(ordinates)
-
Draw polygon by using the given ordinates.
Parameters:
Name Type Description ordinatesarray The list of ordinates.
- Source:
-
setPolygonTool()
-
Enables Polygon tool if not exist.
- Source:
-
setRectangleTool()
-
Initialize the Rectangle Tool.
- Source:
-
setRedlineTool(polygonEndAction, polygonEditAction)
-
Initialize the red line tool.
Parameters:
Name Type Description polygonEndActionfunction The user defined function that is called when a map event is fired.
polygonEditActionfunction The user defined function that is called when a map event is fired.
- Source:
-
showMapCentered(mapCenterLat, mapCenterLon, mapZoom)
-
Show map defined by its center point.
Parameters:
Name Type Description mapCenterLatdouble The latitude value of center coordinate of the map.
mapCenterLondouble The longitude value of center coordinate of the map.
mapZoomint Initial zoom level of map (1-14).
- Source:
-
showMapRectangle(minLat, minLon, maxLat, maxLon)
-
Show map defined by a bounding rectangle.
Parameters:
Name Type Description minLatint The latitude value of upper left corner coordinate of the rectangle.
minLonint The longitude value of upper left corner coordinate of the rectangle.
maxLatint The latitude value of lower right corner coordinate of the rectangle.
maxLonint The longitude value of lower right corner coordinate of the rectangle.
- Source:
-
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:
Name Type Description zindexint 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.
mapDivstring The div to set the map. If it is null or not specified then it is set as "map".
- Source:
-
startMarqueeZoom()
-
Initialize marquee zoom tool.
- Source:
-
stopMarkerFlowAnimation(tmcKod)
-
Stop Marker Flow Animation.
Parameters:
Name Type Description tmcKodstring TMC code.
- Source:
-
stopMarqueeZoom()
-
Initialize marquee zoom tool.
- Source:
-
xml2json()
-
Parse xml data to convert into json format.
- Source:
Returns:
Json object.
-
zoomIn()
-
Zoom in by one level.
- Source:
-
zoomLevel(mapZoom)
-
Set zoom level.
Parameters:
Name Type Description mapZoomint Zoom level. Takes an integer value from 1 to 8.
- Source:
-
zoomOut()
-
Zoom out by one level.
- Source:
-
zoomToLayer(id)
-
Zooms to a layer.
Parameters:
Name Type Description idstring Name of layer theme.
- Source:
-
zoomToMarkers(list)
-
Zoom to the area bounded by multiple markers.
Parameters:
Name Type Description liststring Id list of markers as a single string, separated by comma (,).
- Source: