Maps API for JavaScript Developer's Guide Version 3.0.13.0 Maps API for JavaScript Developer's Guide ► Notices Important Information Notices Topics: This section contains document notices. • Legal Notices • Document Information 2 Maps API for JavaScript Developer's Guide ► Notices Legal Notices © 2017 HERE Global B.V. and its Affiliate(s). All rights reserved. This material, including documentation and any related computer programs, is protected by copyright controlled by HERE. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of HERE. This material also contains confidential information, which may not be disclosed to others without the prior written consent of HERE. Trademark Acknowledgements HERE is trademark or registered trademark of HERE Global B.V. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. Disclaimer This content is provided "as-is" and without warranties of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, satisfactory quality and non-infringement. HERE does not warrant that the content is error free and HERE does not warrant or make any representations regarding the quality, correctness, accuracy, or reliability of the content. You should therefore verify any information contained in the content before acting on it. To the furthest extent permitted by law, under no circumstances, including without limitation the negligence of HERE, shall HERE be liable for any damages, including, without limitation, direct, special, indirect, punitive, consequential, exemplary and/ or incidental damages that result from the use or application of this content, even if HERE or an authorized representative has been advised of the possibility of such damages. 3 Maps API for JavaScript Developer's Guide ► Notices Document Information Product Name: Maps API for JavaScript Version: Version 3.0.13.0 Document Name: Maps API for JavaScript Developer's Guide ID: 9b70bd4-1490862652-849517ab Status: FINAL Date: 2017-Mar-30, 8:32 (GMT) 4 Maps API for JavaScript Developer's Guide ► Contents Contents Chapter 1: Overview 14 ......................................................................................................................................................................... What is the Maps API for JavaScript?.....................................................................................................................................................15 Why use the Maps API for JavaScript?...................................................................................................................................................15 Browser Support................................................................................................................................................................................................16 HERE Maps API for JavaScript Modules...............................................................................................................................................16 Chapter 2: Quick Start 18 .................................................................................................................................................................. Use Case.................................................................................................................................................................................................................19 Loading the API Code Libraries.................................................................................................................................................................19 Initialize Communication with Back-end Services..........................................................................................................................20 Initialize the Map..............................................................................................................................................................................................20 Complete HTML Example Page..................................................................................................................................................................21 Chapter 3: Guide 23 ................................................................................................................................................................................... Acquiring Credentials......................................................................................................................................................................................24 HERE Server Environments..........................................................................................................................................................................24 API versions.........................................................................................................................................................................................................24 Map Types.............................................................................................................................................................................................................25 Map Events............................................................................................................................................................................................................31 Map Objects.........................................................................................................................................................................................................34 Marker Objects...............................................................................................................................................................................................36 Geo Shapes.......................................................................................................................................................................................................41 StreetLevel............................................................................................................................................................................................................46 Map Controls and UI.......................................................................................................................................................................................49 Geocoding.............................................................................................................................................................................................................56 Routing....................................................................................................................................................................................................................62 Traffic.......................................................................................................................................................................................................................67 Places.......................................................................................................................................................................................................................70 Discovering Places........................................................................................................................................................................................70 Refining Search Results.............................................................................................................................................................................72 Using Location Contexts............................................................................................................................................................................74 Listing Categories for a Location.........................................................................................................................................................76 5 Maps API for JavaScript Developer's Guide ► Contents Integration with the Map..........................................................................................................................................................................77 Clustering..............................................................................................................................................................................................................80 Metainfo.................................................................................................................................................................................................................85 Platform Data Extension...............................................................................................................................................................................88 Venues....................................................................................................................................................................................................................90 KML Support........................................................................................................................................................................................................96 Best Practices.....................................................................................................................................................................................................98 Service Support...............................................................................................................................................................................................102 Chapter 4: API reference 103 ....................................................................................................................................................... Namespace: H.................................................................................................................................................................................................104 Class: Map...................................................................................................................................................................................................104 Type definition: BackgroundRange.............................................................................................................................................119 Enumeration: EngineType...............................................................................................................................................................120 Type definition: Options...................................................................................................................................................................121 Namespace: clustering..........................................................................................................................................................................123 Class: DataPoint....................................................................................................................................................................................123 Interface: ICluster................................................................................................................................................................................125 Interface: INoisePoint........................................................................................................................................................................127 Interface: IResult..................................................................................................................................................................................129 Interface: ITheme.................................................................................................................................................................................130 Class: Provider.......................................................................................................................................................................................131 Type definition: ClusteringOptions.........................................................................................................................................139 Type definition: Options..............................................................................................................................................................140 Enumeration: Strategy...................................................................................................................................................................142 Namespace: data.....................................................................................................................................................................................143 Class: AbstractReader........................................................................................................................................................................143 Class: Event.........................................................................................................................................................................................145 Enumeration: State.........................................................................................................................................................................146 Namespace: geojson..........................................................................................................................................................................147 Class: Reader......................................................................................................................................................................................147 Type definition: Options...........................................................................................................................................................151 Namespace: heatmap........................................................................................................................................................................151 Class: Colors........................................................................................................................................................................................151 Interface: IDataPoint......................................................................................................................................................................153 Class: Provider...................................................................................................................................................................................153 Type definition: Options..........................................................................................................................................................156 Namespace: kml...................................................................................................................................................................................158 6 Maps API for JavaScript Developer's Guide ► Contents Class: Reader......................................................................................................................................................................................158 Namespace: geo.......................................................................................................................................................................................161 Class: AbstractGeometry..................................................................................................................................................................162 Type definition: Altitude..................................................................................................................................................................163 Enumeration: AltitudeContext.......................................................................................................................................................163 Interface: IPoint....................................................................................................................................................................................164 Interface: IProjection.........................................................................................................................................................................165 Type definition: Latitude.................................................................................................................................................................168 Type definition: Longitude.............................................................................................................................................................168 Class: PixelProjection........................................................................................................................................................................168 Class: Point..............................................................................................................................................................................................173 Class: Rect................................................................................................................................................................................................177 Class: Strip..............................................................................................................................................................................................188 Namespace: lang......................................................................................................................................................................................195 Class: IllegalOperationError...........................................................................................................................................................195 Class: InvalidArgumentError..........................................................................................................................................................196 Class: OutOfRangeError....................................................................................................................................................................196 Namespace: map......................................................................................................................................................................................197 Class: AbstractMarker........................................................................................................................................................................197 Type definition: Options..............................................................................................................................................................206 Class: ArrowStyle..................................................................................................................................................................................207 Type definition: Options..............................................................................................................................................................208 Class: ChangeEvent............................................................................................................................................................................209 Class: Circle.............................................................................................................................................................................................211 Type definition: Options..............................................................................................................................................................223 Class: DataModel.................................................................................................................................................................................225 Class: DomIcon......................................................................................................................................................................................231 Type definition: Options..............................................................................................................................................................232 Class: DomMarker................................................................................................................................................................................233 Type definition: Options..............................................................................................................................................................241 Class: GeoShape...................................................................................................................................................................................243 Class: Group...........................................................................................................................................................................................252 Type definition: Options..............................................................................................................................................................263 Class: HitArea........................................................................................................................................................................................264 Enumeration: ShapeType.............................................................................................................................................................265 Interface: IControl...............................................................................................................................................................................265 Interface: ICopyright..........................................................................................................................................................................268 Interface: IInteraction.......................................................................................................................................................................268 7 Maps API for JavaScript Developer's Guide ► Contents Class: Icon...............................................................................................................................................................................................270 Enumeration: State.........................................................................................................................................................................274 Type definition: Options..............................................................................................................................................................275 Class: Imprint.........................................................................................................................................................................................276 Type definition: Options..............................................................................................................................................................278 Class: Marker..........................................................................................................................................................................................279 Type definition: Options..............................................................................................................................................................288 Class: Object..........................................................................................................................................................................................289 Type definition: Options..............................................................................................................................................................296 Enumeration: Type..........................................................................................................................................................................297 Class: Overlay........................................................................................................................................................................................298 Type definition: Options..............................................................................................................................................................308 Class: Polygon.......................................................................................................................................................................................309 Class: Polyline.......................................................................................................................................................................................320 Type definition: Options..............................................................................................................................................................330 Class: Rect...............................................................................................................................................................................................332 Class: Spatial.........................................................................................................................................................................................343 Type definition: Label...................................................................................................................................................................352 Type definition: Options..............................................................................................................................................................353 Class: SpatialStyle...............................................................................................................................................................................354 Type definition: LineCap..............................................................................................................................................................357 Type definition: LineJoin.............................................................................................................................................................358 Type definition: Options..............................................................................................................................................................358 Class: ViewModel.................................................................................................................................................................................359 Type definition: CameraData.....................................................................................................................................................365 Type definition: RequestedData..............................................................................................................................................366 Class: UpdateEvent.........................................................................................................................................................................367 Class: ViewPort.....................................................................................................................................................................................369 Type definition: Options..............................................................................................................................................................374 Type definition: Padding..............................................................................................................................................................375 Namespace: layer................................................................................................................................................................................376 Class: BaseTileLayer.......................................................................................................................................................................376 Interface: IMarkerLayer................................................................................................................................................................384 Type definition: Response......................................................................................................................................................386 Type definition: TiledResponse............................................................................................................................................387 Interface: ITileLayer.......................................................................................................................................................................388 Type definition: Options..........................................................................................................................................................390 Type definition: Response......................................................................................................................................................390 8 Maps API for JavaScript Developer's Guide ► Contents Class: Layer.........................................................................................................................................................................................391 Type definition: Options..........................................................................................................................................................396 Class: MarkerTileLayer...................................................................................................................................................................397 Class: ObjectLayer...........................................................................................................................................................................406 Type definition: Options..........................................................................................................................................................415 Type definition: OverlaysResponse....................................................................................................................................416 Class: TileLayer..................................................................................................................................................................................417 Namespace: provider........................................................................................................................................................................425 Class: ImageTileProvider..............................................................................................................................................................425 Type definition: Options..........................................................................................................................................................433 Class: Invalidations.........................................................................................................................................................................434 Enumeration: Flag.......................................................................................................................................................................438 Type definition: Mark................................................................................................................................................................439 Class: LocalObjectProvider.........................................................................................................................................................439 Class: MarkerTileProvider............................................................................................................................................................449 Type definition: Options..........................................................................................................................................................456 Class: ObjectProvider.....................................................................................................................................................................457 Class: Provider..................................................................................................................................................................................466 Type definition: Options...........................................................................................................................................................471 Class: RemoteTileProvider..........................................................................................................................................................472 Class: Tile.............................................................................................................................................................................................479 Class: TileProvider...........................................................................................................................................................................481 Type definition: Options..........................................................................................................................................................487 Namespace: render............................................................................................................................................................................488 Class: RenderEngine......................................................................................................................................................................488 Enumeration: InteractionModifiers.....................................................................................................................................491 Namespace: p2d...............................................................................................................................................................................492 Class: RenderEngine...................................................................................................................................................................493 Namespace: mapevents.......................................................................................................................................................................497 Class: Behavior.....................................................................................................................................................................................498 Type definition: Options..............................................................................................................................................................500 Class: ContextMenuEvent.................................................................................................................................................................501 Class: Event............................................................................................................................................................................................503 Class: MapEvents.................................................................................................................................................................................506 Class: Pointer.........................................................................................................................................................................................510 Enumeration: Button......................................................................................................................................................................512 Type definition: Buttons..............................................................................................................................................................513 Class: WheelEvent................................................................................................................................................................................513 9 Maps API for JavaScript Developer's Guide ► Contents Namespace: math....................................................................................................................................................................................516 Type definition: BitMask..................................................................................................................................................................516 Interface: IPoint....................................................................................................................................................................................516 Interface: ISize.......................................................................................................................................................................................517 Class: Point.............................................................................................................................................................................................518 Type definition: Range......................................................................................................................................................................523 Class: Rect...............................................................................................................................................................................................524 Class: Size................................................................................................................................................................................................526 Namespace: places.................................................................................................................................................................................527 Class: Around.........................................................................................................................................................................................528 Class: Categories..................................................................................................................................................................................529 Class: Explore........................................................................................................................................................................................530 Class: Here...............................................................................................................................................................................................531 Class: Lookup.........................................................................................................................................................................................533 Class: Search..........................................................................................................................................................................................534 Class: Suggest........................................................................................................................................................................................535 Namespace: model.............................................................................................................................................................................536 Class: GetLink....................................................................................................................................................................................536 Class: PostLink...................................................................................................................................................................................537 Class: ResultSet................................................................................................................................................................................538 Namespace: service...............................................................................................................................................................................540 Class: AbstractRestService..............................................................................................................................................................540 Type definition: DefaultLayers.....................................................................................................................................................542 Class: EnterpriseRoutingService..................................................................................................................................................543 Type definition: Options..............................................................................................................................................................547 Class: GeocodingService..................................................................................................................................................................548 Type definition: Options..............................................................................................................................................................551 Interface: IConfigurable....................................................................................................................................................................552 Type definition: JsonpRequestHandle......................................................................................................................................553 Class: MapTileService........................................................................................................................................................................554 Type definition: Info......................................................................................................................................................................559 Type definition: Options..............................................................................................................................................................560 Type definition: MapType................................................................................................................................................................561 Class: PlacesService...........................................................................................................................................................................563 Enumeration: EntryPoint.............................................................................................................................................................569 Type definition: Options..............................................................................................................................................................570 Class: Platform.......................................................................................................................................................................................571 Type definition: DefaultLayersOptions.................................................................................................................................578 10
Description: