1 /** 2 * Create a new IMapper instance. 3 * @class IMapper class 4 * This class could be considered a concrete implementation class 5 * @constructor 6 */ 7 function IMapper() { 8 } 9 10 /** 11 * Initialize the IMapper object 12 * @param {int} mapCenterLat The latitude value of center coordinate of the map 13 * @param {int} mapCenterLon The longitude value of center coordinate of the map 14 * @param {int} mapZoom Initial zoom level of map (1-14) 15 * @param {String} pBaseMap Name of the basemap. Three types of basemap is defined in LocationBox. <br/> 16 * IMapper.BASEMAP_SIMPLE - Simple basemap displaying limited administrative data. (cities, borders)<br/> 17 * IMapper.BASEMAP_POI - Basemap showing POIs additional to administrative data. (cities, borders, roads etc.)<br/> 18 * IMapper.BASEMAP_POI_LOGO - Basemap showing POIs represented by their own logos.<br/><br/> 19 * If basemap is not specified, default basemap is BASEMAP_POI_LOGO. 20 * @param {String} pUrlBase Url of the map server. <br/> 21 * If url base is not specified, default url base is <i>http://www.locationbox.com.tr/mapviewer</i> 22 * @param {String} mapDiv The div to set the map. If it is null or not specified then it is set as "map". 23 */ 24 IMapper.prototype.initMap=function(mapCenterLat, mapCenterLon, mapZoom, pBaseMap, pUrlBase, mapDiv) { 25 return; 26 } 27 28 /** 29 * Initialize the IMapper object with given extent coordinates 30 * @param {double} minLat The minimum latitude extent of the map 31 * @param {double} minLon The minimum longitude extent of the map 32 * @param {double} maxLat The maximum latitude extent of the map 33 * @param {double} maxLon The maximum longitude extent of the map 34 * @param {String} pBaseMap Name of the basemap. Three types of basemap is defined in LocationBox. <br/> 35 * IMapper.BASEMAP_SIMPLE - Simple basemap displaying limited administrative data. (cities, borders)<br/> 36 * IMapper.BASEMAP_POI - Basemap showing POIs additional to administrative data. (cities, borders, roads etc.)<br/> 37 * IMapper.BASEMAP_POI_LOGO - Basemap showing POIs represented by their own logos.<br/><br/> 38 * If basemap is not specified, default basemap is BASEMAP_POI_LOGO. 39 * @param {String} pUrlBase Url of the map server. <br/> 40 * If url base is not specified, default url base is <i>http://www.locationbox.com.tr/mapviewer</i> 41 * @param {String} mapDiv The div to set the map. If it is null or not specified then it is set as "map". 42 */ 43 IMapper.prototype.initMapWithExtent=function(minLat, minLon, maxLat, maxLon, pBaseMap, pUrlBase, mapDiv) { 44 return; 45 } 46 47 /** 48 * Add Bing tile layer 49 * @param {string} bingKey The key for Bing service 50 * @param {boolean} hybrid Default: false (Satelite) true: Hybrid 51 */ 52 IMapper.prototype.addBingTileLayer=function(bingKey, hybrid) { 53 return; 54 } 55 56 /** 57 * Remove Bing Tile Layer from the map 58 */ 59 IMapper.prototype.removeBingTileLayer=function() { 60 return; 61 } 62 63 /** 64 * Add navigation panel to the map 65 * @see http://www.locationbox.com.tr/web/demo/navigationpanel.jsp 66 * @param {string} loc The parameter to set the navigation to east or west. Default: west 67 * 68 */ 69 IMapper.prototype.addNavigationPanel=function(loc) { 70 return; 71 } 72 73 /** 74 * Add scale bar to the map 75 * @see http://www.locationbox.com.tr/web/demo/scalebar.jsp 76 * @param {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. 77 * @param {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. 78 * @param {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. 79 * @param {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. 80 */ 81 IMapper.prototype.addScaleBar=function(position, hOffset, vOffset, transformToGeodetic) { 82 return; 83 } 84 85 /** 86 * 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. 87 * @param {boolean} a Boolean that specifies whether to enable loading icon, true(enable) or false(disable). (Default: true) 88 */ 89 IMapper.prototype.enableLoadingIcon=function(enable) { 90 return; 91 } 92 93 /** 94 * This methods enables or disables keyboard panning. When keyboard panning is enabled, user can pan the map by pressing the arrow keys. 95 * @param {boolean} a Boolean that specifies whether to enable keyboard panning, true(enable) or false(disable). (Default: true) 96 */ 97 IMapper.prototype.enableKeyboardPanning=function(enable) { 98 return; 99 } 100 101 /** 102 * This method enables or disables dragging of the current map. 103 * @param {boolean} true (enable dragging) or false (disable dragging). (Default: true) 104 */ 105 IMapper.prototype.enableDragging=function(dragging) { 106 return ; 107 } 108 109 /** 110 * 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. 111 * @param a boolean that specifies whether to enable mouse wheel zooming. (Default: true) 112 */ 113 IMapper.prototype.enableMouseWheelZooming=function(wheelZooming) { 114 return ; 115 } 116 117 /** 118 * Add collapsible overview to the map </br> 119 * @see http://www.locationbox.com.tr/web/demo/overview_collapsible.jsp </br> 120 * @param {String} title The title of the overview window 121 * @param {int} width The width of the overview window 122 * @param {int} height The height of the overview window 123 * @param {boolean} state 124 */ 125 IMapper.prototype.addCollapsibleOverview=function(title, width, height, state) { 126 return; 127 } 128 129 /** 130 * Add overview to the map 131 * @see http://www.locationbox.com.tr/web/demo/overview.jsp 132 * @param {String} ovdiv The div to set the overview window. If it is null or not specified then it is set as "ow". 133 */ 134 IMapper.prototype.addOverview=function(ovdiv) { 135 return; 136 } 137 138 /** 139 * Add a distance measuring tool to the map 140 * @see http://www.locationbox.com.tr/web/demo/distancemeasuring.jsp 141 */ 142 IMapper.prototype.addDistanceMeasuringTool=function() { 143 return; 144 } 145 146 /** 147 * Show map defined by its center point 148 * @param {int} mapCenterLat The latitude value of center coordinate of the map 149 * @param {int} mapCenterLon The longitude value of center coordinate of the map 150 * @param {int} mapZoom Initial zoom level of map (1-14) 151 */ 152 IMapper.prototype.showMapCentered=function(mapCenterLat, mapCenterLon, mapZoom) { 153 return; 154 } 155 156 /** 157 * Show map defined by a bounding rectangle 158 * @param {int} minLat The latitude value of upper left corner coordinate of the rectangle 159 * @param {int} minLon The longitude value of upper left corner coordinate of the rectangle 160 * @param {int} maxLat The latitude value of lower right corner coordinate of the rectangle 161 * @param {int} maxLon The longitude value of lower right corner coordinate of the rectangle 162 */ 163 IMapper.prototype.showMapRectangle=function(minLat, minLon, maxLat, maxLon) { 164 return; 165 } 166 167 /** 168 * Get coordinates of the bounding box of the map window 169 * @returns (object) 170 */ 171 IMapper.prototype.getMapRectangle=function() { 172 return bbox.getMBR(); 173 } 174 175 /** 176 * Get coordinates of the location that mouse points 177 * @returns (object) 178 */ 179 IMapper.prototype.getMouseLocation=function(mc) { 180 return { x: pos.getPointX(), y: pos.getPointY() }; 181 } 182 183 /** 184 * Display an info window at specified latitude/longitude. 185 * 186 * @param {int} x 187 * @param {int} y 188 * @returns {object} 189 */ 190 IMapper.prototype.getMapCoordinates=function(x, y) { 191 return { x: pos.getPointX(), y: pos.getPointY() }; 192 } 193 194 /** 195 * Display an info window at specified latitude/longitude. 196 * @see http://www.locationbox.com.tr/web/demo/addHTMLmarker.jsp 197 * 198 * @param {int} latitude The latitude value of the point that info window going to be displayed. 199 * @param {int} longitude The longitude value of the point that info window going to be displayed. 200 * @param {string} html An HTML content string that is going to be displayed inside the info window. 201 * @param {int} width The width of the info window in pixels. 202 * @param {int} height The height of the info window in pixels. 203 * @param {string} title A string that is going to be displayed at the header of the info window. 204 * @param {Object} parameters the object that specifies the custom style parameters, which are effective only when the info window style is "MVInfoWindowStyle1".. 205 */ 206 IMapper.prototype.displayInfoWindow=function(latitude, longitude, html, width, height, title, parameters) { 207 return; 208 } 209 210 /** 211 * Remove the existing info window. 212 */ 213 IMapper.prototype.removeInfoWindow=function() { 214 return; 215 } 216 217 /** 218 * Display an HTML map decoration object on the map. 219 * A map decoration object may be placed on top of the map and does not move 220 * while the map is recentered. </br> 221 * @see http://www.locationbox.com.tr/web/demo/mapdecoration.jsp</br> 222 * Map decoration can be used as a collapsible window (@link addCollapsibleMapDecoration) 223 * so that it can be minimized by the user. 224 * 225 * @param {string} id A string that identifies the map decoration object. 226 * @param {string} html An HTML content string that is going to be displayed inside the map decoration. 227 * @param {float} top The vertical position of the map decoration relative to the top border of map window. 228 * @param {float} left The horizontal poisiton of the map decoration relative to left border of map window. 229 * @param {int} width The width of map decoration in pixels. 230 * @param {int} height The height of map decoration in pixels. 231 * @param {Function} mclick The function for mouse click event 232 */ 233 IMapper.prototype.addMapDecoration=function(id, html, top, left, width, height, mclick) { 234 return; 235 } 236 237 /** 238 * Add a map decoration in lower right corner of the map window. 239 * This object is as same as the map decoration, only appears in a collapsible window and can be minimized. 240 * 241 * @see http://www.locationbox.com.tr/web/demo/mapdecoration.jsp 242 * @param {string} id A string that identifies the map decoration object. 243 * @param {string} html An HTML content string that is going to be displayed inside the map decoration. 244 * @param {int} width The width of map decoration in pixels. 245 * @param {int} height The height of map decoration in pixels. 246 * @param {Boolean} minimizeWhenCreated True if the map decoration is minimized when the map decoration is added to the map. The default value is false. 247 * @param {Object} style The style object. 248 */ 249 IMapper.prototype.addCollapsibleMapDecoration=function(id, html, width, height, minimizeWhenCreated, style) { 250 return; 251 } 252 253 /** 254 * Remove the map decoration by specifying its id. 255 * 256 * @param {string} id Id of the map decoration. 257 */ 258 IMapper.prototype.removeMapDecoration=function(id) { 259 return; 260 } 261 262 /** 263 * Add marker group to the map 264 * 265 * @param {string} id The id of group marker. 266 * @param {Array} array Array of Markers that need to be grouped. 267 * @param {int} minZoomLevel The minimum zoom level that will be visible for marker group. 268 * @param {int} maxZoomLevel The maximum zoom level that will be visible for marker group. 269 * @param {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. 270 */ 271 IMapper.prototype.addMarkerGroup=function(id, array, minZoomLevel, maxZoomLevel, zindex) { 272 return; 273 } 274 275 /** 276 * Add marker group to the map 277 * 278 * @param {string} id Id of marker group 279 * @param {boolean} visible Visibility of the layer 280 */ 281 IMapper.prototype.setMarkerGroupVisible=function(id, visible) { 282 return; 283 } 284 285 /** 286 * Set marker group minimum visible zoom level 287 * 288 * @param {string} id Id of marker group 289 * @param {int} zoomLevel Zoomlevel of the marker group 290 */ 291 IMapper.prototype.setMarkerGroupMinVisibleZoomLevel=function(id, zoomLevel) { 292 return; 293 } 294 295 /** 296 * Set marker group maximum visible zoom level 297 * 298 * @param {string} id Id of marker group 299 * @param {int} zoomLevel Zoomlevel of the marker group 300 */ 301 IMapper.prototype.setMarkerGroupMaxVisibleZoomLevel=function(id, zoomLevel) { 302 return; 303 } 304 305 /** 306 * Remove an added feature by specifying its id. 307 * 308 * @param {string} id Id of the feature. 309 */ 310 IMapper.prototype.removeFeature=function(id) { 311 return; 312 } 313 314 315 /** 316 * Add a marker pointing to a specified point. 317 * @see http://www.locationbox.com.tr/web/demo/addmarker.jsp 318 * 319 * @param {string} id Id of the marker. 320 * @param {int} latitude The latitude value of the point. 321 * @param {int} longitude The longitude value of the point. 322 * @param {string} name Name of the marker. 323 * @param {string} sym The name of the style object for marker, as in the map database or created by user. (@See createColorStyle) 324 * @param {int} w The width of marker symbol in pixels. 325 * @param {int} h The height of marker symbol in pixels. 326 * @param {Function} mclick The user defined function that is called when the marker is clicked. 327 * @param {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. 328 */ 329 IMapper.prototype.addMarker=function(id, latitude, longitude, name, sym, w, h, mclick, zindex) { 330 return; 331 } 332 333 /** 334 * Update the marker with given id and set latitude, longitude and z-index values to that marker 335 * 336 * @param {string} id Id of the marker. 337 * @param {int} latitude The latitude value of the point. 338 * @param {int} longitude The longitude value of the point. 339 * @param {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. 340 */ 341 342 IMapper.prototype.moveMarker=function(id, latitude, longitude, zindex) { 343 return; 344 } 345 346 /** 347 * Add a marker pointing to a specified point. 348 * Any image can be used as a marker. </br> 349 * @see http://www.locationbox.com.tr/web/demo/addcustommarker.jsp </br> 350 * @param {string} id Id of the marker. 351 * @param {int} latitude The latitude value of the point. 352 * @param {int} longitude The longitude value of the point. 353 * @param {string} name Name of the marker. 354 * @param {string} imageUrl Path of the image to be used as marker. 355 * @param {obj} mclick The user defined function that is called when the marker is clicked. 356 * @param {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. 357 * @param {int} width The width of marker symbol in pixels. 358 * @param {int} height The height of marker symbol in pixels. 359 */ 360 IMapper.prototype.addCustomMarker=function(id, latitude, longitude, name, imageUrl, mclick, zindex, width, height) { 361 return; 362 } 363 364 /** 365 * Add an HTML content as marker pointing to a specified point. 366 * 367 * @param {string} id Id of the marker. 368 * @param {int} latitude The latitude value of the point. 369 * @param {int} longitude The longitude value of the point. 370 * @param {string} html HTML content 371 * @param {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. 372 */ 373 IMapper.prototype.addHtmlMarker=function(id, latitude, longitude, html, zindex) { 374 return; 375 } 376 377 /** 378 * Move a marker to a specified position or visit a set of positions. 379 * @param {string} id Id of the marker. 380 * @param {Array} ordinates The set of coordinates. 381 * @param {int} interval affects the marker moving speed. The default value is 100. A larger value results in a slower movement. 382 * @see http://www.locationbox.com.tr/web/demo/addanimatedmarker.jsp 383 */ 384 IMapper.prototype.animateMarker=function(id, ordinates, interval) { 385 return; 386 } 387 388 /** 389 * Animates the marker flow according to TMC code geometries. 390 * @see http://www.locationbox.com.tr/web/demo/addtmctrafficinfowithflow.jsp 391 * 392 * @param {string} tmcKod TMC code. 393 * @param {int} interval affects the marker moving speed. The default value is 100. A larger value results in a slower movement. 394 * @param {string} sym The name of the style object for marker, as in the map database or created by user. 395 * @param {int} width The width of marker symbol in pixels. 396 * @param {int} height The height of marker symbol in pixels. 397 * @param {boolean} repeat Animation repeats(true) or not 398 * @param {string} factor The interval between repeat time duration. 399 * @param {boolean} reverse Reversed ordinates 400 */ 401 IMapper.prototype.animateMarkerFlow=function(tmcKod, interval, sym, width, height, repeat, factor, reverse) { 402 return; 403 } 404 405 /** 406 * Stop Marker Flow Animation 407 * 408 * @param {string} tmcKod TMC code. 409 */ 410 IMapper.prototype.stopMarkerFlowAnimation=function(tmcKod) { 411 return; 412 } 413 414 /** 415 * Get Marker 416 * 417 * @param {int} id The id of marker. 418 */ 419 IMapper.prototype.getMarker=function(id) { 420 return; 421 } 422 423 /** 424 * Set Marker Visible 425 * 426 * @param {int} id The id of marker. 427 * @param {boolean} visible Visibility of the marker 428 */ 429 IMapper.prototype.setMarkerVisible=function(id, visible) { 430 return; 431 } 432 433 /** 434 * Set Marker Image Url 435 * 436 * @param {int} id The id of marker. 437 * @param {string} url Image url 438 * @param {int} w Marker width in pixels 439 * @param {int} h Marker width in pixels 440 */ 441 IMapper.prototype.setMarkerImageUrl=function(id, url, w, h) { 442 return; 443 } 444 445 /** 446 * Add a label to a specified marker.</br> 447 * @see http://www.locationbox.com.tr/web/demo/addmarkerwlabel.jsp </br> 448 * 449 * @param {string} id Id of the marker. 450 * @param {string} html The html content of the label. 451 * @param {string} name Name of the line object. 452 * @param {int} xOffset Horizontal offset value for the position of the label. 453 * @param {int} yOffset Vertical offset value for the position of the label 454 */ 455 IMapper.prototype.addLabelToMarker=function(id, html, xOffset, yOffset) { 456 return; 457 } 458 459 /** 460 * Remove the label from a specified marker. 461 * 462 * @param {string} id Id of the marker. 463 */ 464 IMapper.prototype.removeLabelFromMarker=function(id) { 465 return; 466 } 467 468 /** 469 * Set marker listener. 470 * 471 * @param {string} id Id of the marker. 472 * @param {object} event Types of events.</br> 473 * IMapper.MARKER_MOUSE_CLICK</br> 474 * IMapper.MARKER_MOUSE_OVER</br> 475 * IMapper.MARKER_MOUSE_OUT</br> 476 * IMapper.MARKER_MOUSE_RIGHT_CLICK</br> 477 * @param {function} callback The user defined function that is called when marker is set. 478 */ 479 IMapper.prototype.setMarkerListener=function(id, event, callback) { 480 return; 481 } 482 483 /** 484 * Set marker listener. 485 * 486 * @param {string} id Id of the marker. 487 * @param {object} event Types of events.</br> 488 * IMapper.MARKER_MOUSE_CLICK</br> 489 * IMapper.MARKER_MOUSE_OVER</br> 490 * IMapper.MARKER_MOUSE_OUT</br> 491 * IMapper.MARKER_MOUSE_RIGHT_CLICK</br> 492 * @param {function} callback The user defined function that is called when marker is set. 493 */ 494 IMapper.prototype.clearMarkerListener=function(id, event, callback) { 495 return; 496 } 497 498 /** 499 * Add a line specified by array of coordinates. 500 * @see http://www.locationbox.com.tr/web/demo/addline.jsp 501 * 502 * @param {string} id Id of the line object. 503 * @param {array} ordinates The set of coordinates. 504 * @param {string} name Name of the line object. 505 * @param {string} sym The name of the style object for line, as in the map database or created by user. (@See createColorStyle) 506 * @param {Function} mclick The user defined function that is called when the line is clicked. 507 * @param {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. 508 */ 509 IMapper.prototype.addLine=function(id, ordinates, name, sym, mclick, zindex) { 510 return; 511 } 512 513 /** 514 * Add a region as a polygon specified by array of coordinates. 515 * @see http://www.locationbox.com.tr/web/demo/addregion.jsp 516 * 517 * @param {string} id Id of the polygon object. 518 * @param {array} ordinates The set of coordinates. 519 * @param {string} name Name of the polygon object. 520 * @param {string} sym Name of the style object for polygon, as in the map database or created by user. (@See createColorStyle) 521 * @param {Function} mclick The user defined function that is called when the region is clicked. 522 * @param {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. 523 */ 524 IMapper.prototype.addRegion=function(id, ordinates, name, sym, mclick, zindex) { 525 return; 526 } 527 528 /** 529 * Add a circle by specifying its center point and radius. </br> 530 * @see http://www.locationbox.com.tr/web/demo/addcircle.jsp 531 * 532 * @param {string} id Id of the circle object. 533 * @param {float} latitude The latitude value of center point. 534 * @param {float} longitude The longitude value of center point. 535 * @param {float} radius The radius value of the circle 536 * @param {string} name The name of the circle object. 537 * @param {string} sym The name of the symbol for circle, as written on the map database. 538 * @param {Function} mclick The user defined function that is called when the circle is clicked. 539 * @param {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. 540 */ 541 IMapper.prototype.addCircle=function(id, latitude, longitude, radius, name, sym, mclick, zindex) { 542 return; 543 } 544 545 /** 546 * Show the visualized traffic data on the map.<br/> 547 * There are 4 grades of traffic density represented by 4 colors:<br/> 548 * Light Green: Little or no traffic density. No delay.<br/> 549 * Dark Green: Increasing traffic density. Slight delay.<br/> 550 * Orange: Increased traffic density.<br/> 551 * Red: Traffic jam.<br/> 552 * @param {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. 553 * @param {String} mapDiv The div to set the map. If it is null or not specified then it is set as "map". 554 * @see http://www.locationbox.com.tr/web/demo/addtrafficinfo.jsp 555 */ 556 IMapper.prototype.showTrafficView=function(zindex, mapdiv) { 557 return; 558 } 559 560 /** 561 * Hide the visualized traffic data on the map. 562 * 563 */ 564 IMapper.prototype.hideTrafficView=function() { 565 return; 566 } 567 568 /** 569 * Add the visualized traffic data on the map. 570 * @see http://www.locationbox.com.tr/web/demo/addtmctrafficinfowithflow.jsp 571 * @param {array} tmcKodList The array of TMC code list. 572 * 573 */ 574 IMapper.prototype.addTrafficTmc=function(tmcKodList) { 575 return; 576 } 577 578 /** 579 * Remove Traffic TMC from the map 580 */ 581 IMapper.prototype.removeTrafficTmc=function() { 582 return; 583 } 584 585 /** 586 * Add the traffic event data on the map. 587 * @see http://www.locationbox.com.tr/web/demo/addtrafficinfo.jsp 588 * 589 */ 590 IMapper.prototype.addTrafficEvents=function() { 591 return; 592 } 593 594 /** 595 * Remove the traffic event data from the map. 596 * 597 */ 598 IMapper.prototype.removeTrafficEvents=function() { 599 return; 600 } 601 602 /** 603 * Add social events to the map 604 * @see http://www.locationbox.com.tr/web/demo/addsocialevents.jsp 605 */ 606 IMapper.prototype.addSocialEvents=function() { 607 return; 608 } 609 610 /** 611 * Remove social events from the map 612 */ 613 IMapper.prototype.removeSocialEvents=function() { 614 return; 615 } 616 617 /** 618 * Add weather report layer to the map 619 * @see http://www.locationbox.com.tr/web/demo/addweatherreport.jsp 620 * @param {boolean} enablelabel The boolean value for enabling the label. 621 * @param {function} mouseclick The user defined function that is called when layer is clicked. 622 */ 623 IMapper.prototype.addWeatherReport=function(enablelabel, mouseclick) { 624 return; 625 } 626 627 /** 628 * Remove weather report layer from the map 629 */ 630 IMapper.prototype.removeWeatherReport=function() { 631 return; 632 } 633 634 /** 635 * Add pharmacy on duty layer to the map 636 * @see http://www.locationbox.com.tr/web/demo/pharmacyonduty.jsp 637 */ 638 IMapper.prototype.addPharmacyOnDuty=function() { 639 return; 640 } 641 642 /** 643 * Remove pharmacy on duty layer from the map 644 */ 645 IMapper.prototype.removePharmacyOnDuty=function() { 646 return; 647 } 648 649 /** 650 * Add poi list to the map 651 * @see http://www.locationbox.com.tr/web/demo/addpoi.jsp 652 * @param {string} id The id of POI list. 653 * @param {array} poiList The list of POIs. 654 * @param {function} mouseclick The user defined function that is called when layer is clicked. 655 */ 656 IMapper.prototype.addPoiList=function(id, poiList, mouseclick) { 657 return; 658 } 659 660 /** 661 * Remove poi list from the map 662 * @param {string} id The id of POI list. 663 */ 664 IMapper.prototype.removePoiList=function(id) { 665 return; 666 } 667 668 /** 669 * Add yol list to the map 670 * @see http://www.locationbox.com.tr/web/demo/addyol.jsp 671 * @param {string} id Id of YolList. 672 * @param {array} yolList YolID list. 673 */ 674 IMapper.prototype.addYolList=function(id, yolList) { 675 return; 676 } 677 678 /** 679 * Remove yol list to the map 680 * @param {string} id Id of YolList. 681 */ 682 IMapper.prototype.removeYolList=function(id) { 683 return; 684 } 685 686 /** 687 * Add an existing route path to the map. 688 * @see http://www.locationbox.com.tr/web/demo/addroute.jsp 689 * @param {string} id Id of the route object. 690 * @param {int} pathId The id of the existing path (See http://www.locationbox.com.tr/web/api_route.jsp). 691 * @param {string} sym Name of the symbol for the path style, should be specified as written on the map database. 692 * @param {Function} mclick The user defined function that is called when layer is clicked. 693 */ 694 IMapper.prototype.addRoute=function(id, pathIds, themeName, mclick) { 695 return; 696 } 697 698 /** 699 * Remove an existing route path from the map. 700 * 701 * @param {string} id Id of the route object. 702 */ 703 IMapper.prototype.removeRoute=function(id) { 704 return; 705 } 706 707 /** 708 * Create a vector marker style object. 709 * @see http://www.locationbox.com.tr/web/demo/layercoloring.jsp 710 * 711 * @param {string} name Name of the style 712 * @param {string} fillColor Filling color. A string in the format of "RRGGBB", or null if no filling. 713 * @param {int} fillOpacity Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255. 714 * @param {string} borderColor Border color. A string in the format of "RRGGBB". 715 * @param {int} borderOpacity Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255. 716 * @param {int} borderWidth Border width in device point/pixel unit. Default is 1. 717 * @param {int} width Marker width in pixels. 718 * @param {int} height Marker height in pixels. 719 * @param {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". 720 * @returns {object} Style object 721 */ 722 IMapper.prototype.createVectorMarkerStyle=function(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth, width, height, vector) { 723 return style; 724 } // createVectorMarkerStyle() 725 726 /** 727 * Create an icon marker style object 728 * 729 * @param {string} name Name of the style 730 * @param {string} url Image url 731 * @param {int} width Marker width in pixels 732 * @param {int} height Marker width in pixels 733 * @returns {object} Style object 734 */ 735 IMapper.prototype.createIconMarkerStyle=function(name, url, width, height) { 736 return style; 737 } // createIconMarkerStyle() 738 739 /** 740 * Create a style object. 741 * @see http://www.locationbox.com.tr/web/demo/layercoloring.jsp 742 * @param {string} name Name of the style 743 * @param {string} fillColor Filling color. A string in the format of "RRGGBB", or null if no filling. 744 * @param {int} fillOpacity Opacity of the fill color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255. 745 * @param {string} borderColor Border color. A string in the format of "RRGGBB". 746 * @param {int} borderOpacity Opacity of the border color. Opacity value ranges from 0 (completely transparent) to 255 (completely opaque). Default value is 255. 747 * @param {int} borderWidth Border width in device point/pixel unit. Default is 1. 748 * @returns {object} Style object 749 */ 750 IMapper.prototype.createColorStyle=function(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth) { 751 return sym; 752 } // createColorStyle() 753 754 /** 755 * Create an advanced style object 756 * 757 * @param {string} name Name of the style 758 * @param {string} symlist List of styles in JSON format. 759 * @see http://www.locationbox.com.tr/web/demo/analysisadvancedcoloring.jsp 760 * @returns {object} Style object containing list of style objects. 761 */ 762 IMapper.prototype.createAdvancedStyle=function(name, symlist, dtype) { 763 return style; 764 } // createAdvancedStyle() 765 766 /** 767 * Print the map being viewed. 768 * 769 * @param {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. 770 * @param {int} width The width of the map image. 771 * @param {int} height The height of the map image. 772 */ 773 IMapper.prototype.print=function(callback, width, height) { 774 return; 775 } 776 777 /** 778 * Get the coordinates of point clicked on map. 779 * 780 * @returns The map click position. 781 * @type obj 782 */ 783 IMapper.prototype.getMapClickPosition=function() { 784 return { x: pos.getPointX(), y: pos.getPointY() }; 785 } 786 787 /** 788 * Initialize map listener. 789 * 790 * @param {string} event Name of the event being listened. 791 * @param {Function} callback The user defined function that is called when a map event is fired. 792 * 793 * @see http://www.locationbox.com.tr/web/demo/eventlistener.jsp 794 */ 795 IMapper.prototype.setMapListener=function(event, callback) { 796 return; 797 } 798 799 /** 800 * Clear map listener from the map. 801 * 802 * @param {string} event Name of the event being listened. (See http://www.locationbox.com.tr/web/demo/eventlistener.jsp for the events.) 803 * @param {Function} callback The user defined function that is called when a map event is fired. 804 */ 805 IMapper.prototype.clearMapListener=function(event, callback) { 806 return; 807 } 808 809 /** 810 * Initialize the red line tool. 811 * 812 */ 813 IMapper.prototype.setRedlineTool=function() { 814 return; 815 } 816 817 /** 818 * Get an array of ordinates of the shape drawn with the red line tool. 819 * 820 * @returns Ordinates of the shape drawn. 821 * @type array 822 */ 823 IMapper.prototype.getRedlineOrdinates=function() { 824 return ord; 825 } 826 827 /** 828 * Clear the red line tool. 829 * 830 */ 831 IMapper.prototype.clearRedlineTool=function() { 832 return; 833 } 834 835 /** 836 * Add an instance of Measure Tool to the current map. 837 * 838 */ 839 IMapper.prototype.setMeasureTool=function(getNewPoint, getNewLine) { 840 return; 841 } 842 843 /** 844 * Clear the measure tool 845 */ 846 IMapper.prototype.clearMeasureTool=function() { 847 return; 848 } 849 850 /** 851 * Initialize the circle tool. 852 * @see http://www.locationbox.com.tr/web/demo/circletool.jsp 853 * 854 */ 855 IMapper.prototype.setCircleTool=function(getCircle, getDragEvent) { 856 return; 857 } 858 859 /** 860 * Clear the circle tool. 861 * 862 */ 863 IMapper.prototype.clearCircleTool=function() { 864 return; 865 } 866 867 /** 868 * Get radius and center coordinates of the circle drawn by the circle tool. 869 * @see http://www.locationbox.com.tr/web/demo/circletool.jsp 870 * 871 * @returns Radius and center coordinates of the circle drawn by the circle tool. 872 * @type obj 873 */ 874 IMapper.prototype.getCircleData=function() { 875 return { x: circleCenter.getPointX(), y: circleCenter.getPointY(), radius: circleTool.getRadius('meter') }; 876 } 877 878 /** 879 * This method returns the ordinates object that specifies a polygon that proximates the circle on the map. 880 * 881 * @returns ordinates obj 882 */ 883 IMapper.prototype.getCirclePolygonOrdinates=function() { 884 return ord; 885 } 886 887 /** 888 * Initialize the rectangle tool. 889 * @see http://www.locationbox.com.tr/web/demo/rectangletool.jsp 890 * 891 */ 892 IMapper.prototype.setRectangleTool=function(getRectangle) { 893 return; 894 } 895 896 /** 897 * Clear the rectangle tool. 898 * 899 */ 900 IMapper.prototype.clearRectangleTool=function() { 901 return; 902 } 903 904 /** 905 * Get an array of ordinates of the rectangle drawn with the rectangle tool. 906 * @see http://www.locationbox.com.tr/web/demo/rectangletool.jsp 907 * 908 * @returns Ordinates of the rectangle drawn. 909 * @type array 910 */ 911 IMapper.prototype.getRectangleOrdinates=function() { 912 return ord; 913 } 914 915 /** 916 * Clear polygon tool 917 */ 918 IMapper.prototype.clearPolygonTool=function() { 919 return; 920 } 921 922 /** 923 * Draw polygon by using the given ordinates. 924 * @see http://www.locationbox.com.tr/web/demo/redlinetool.jsp 925 * @param {array} ordinates The list of ordinates 926 */ 927 IMapper.prototype.setPolygonOrdinates=function(ordinates) { 928 return; 929 } 930 931 /** 932 * Get polygon ordinates. 933 * @see http://www.locationbox.com.tr/web/demo/redlinetool.jsp 934 * @returns {array} ordinates The list of ordinates 935 */ 936 IMapper.prototype.getPolygonOrdinates=function() { 937 return ord; 938 } 939 940 /** 941 * Initialize marquee zoom tool. 942 * 943 */ 944 IMapper.prototype.startMarqueeZoom=function() { 945 return; 946 } 947 948 /** 949 * Stop marquee zoom. 950 * 951 */ 952 IMapper.prototype.stopMarqueeZoom=function() { 953 return; 954 } 955 956 /** 957 * Pan the map for half length of the view to the specified direction. 8 directions are available for pan. 958 * 959 * @param {int} typ Pan direction. (Gets a value between 1 and 8, 1 being North and 8 being North-West in clock-wise direction.) 960 */ 961 IMapper.prototype.pan=function(typ) { 962 return; 963 } // pan() 964 965 /** 966 * Zoom in by one level. 967 * 968 */ 969 IMapper.prototype.zoomIn=function() { 970 return; 971 } 972 973 /** 974 * Zoom out by one level. 975 * 976 */ 977 IMapper.prototype.zoomOut=function() { 978 return; 979 } 980 981 /** 982 * Set zoom level 983 * 984 * @param (int) mapZoom Zoom level. Takes an integer value from 1 to 8. 985 */ 986 IMapper.prototype.zoomLevel=function(mapZoom) { 987 return; 988 } 989 990 /** 991 * Get zoom level 992 * 993 * @returns (int) Zoom level 994 */ 995 IMapper.prototype.getZoomLevel=function() { 996 return mapview.getZoomLevel(); 997 } 998 999 /** 1000 * Get center latitude 1001 * 1002 * @returns (double) Y point 1003 */ 1004 IMapper.prototype.getCenterLat=function() { 1005 return pos.getPointY(); 1006 } 1007 1008 /** 1009 * Get center longitude 1010 * 1011 * @returns (double) X point 1012 */ 1013 IMapper.prototype.getCenterLon=function() { 1014 return pos.getPointX(); 1015 } 1016 1017 /** 1018 * Get maximum zoom level 1019 * 1020 * @returns (int) Max zoom level 1021 */ 1022 IMapper.prototype.getMaxZoomLevel=function() { 1023 return mapview.getMaxZoomLevel(); 1024 } 1025 1026 /** 1027 * Zoom to the area bounded by multiple markers. 1028 * 1029 * @param {string} list Id list of markers as a single string, separated by comma (,). 1030 */ 1031 IMapper.prototype.zoomToMarkers=function(list) { 1032 return; 1033 } 1034 1035 1036 /** 1037 * Parse xml data to convert into json format. 1038 * 1039 * @returns Json object. 1040 * @type obj 1041 */ 1042 IMapper.prototype.xml2json=function(xmlData) { 1043 return eval('(' + json + ');'); 1044 } 1045 1046 1047 /** 1048 * Get the location of user. 1049 * @see http://www.locationbox.com.tr/web/demo/getlocation.jsp 1050 * 1051 * @param {function} callback Callback function 1052 */ 1053 IMapper.prototype.getGeolocation=function(callback) { 1054 return; 1055 } 1056 1057 /** 1058 * Add image layer to map. 1059 */ 1060 IMapper.prototype.addImageLayer=function() { 1061 } 1062 1063 /** 1064 * Remove image layer from map 1065 */ 1066 IMapper.prototype.removeImageLayer=function() { 1067 } 1068