×
Namespaces

Variants
Actions
(Difference between revisions)

HERE Maps API - How to create a custom overlay

From Nokia Developer Wiki
Jump to: navigation, search
jasfox (Talk | contribs)
(Jasfox - Initial Stub.)
 
jasfox (Talk | contribs)
m (Jasfox - spacing)
Line 35: Line 35:
  
 
== Introduction ==
 
== Introduction ==
For extremely large data sets, it no longer makes sense to add each data point as an individual {{Icode|marker}}, {{Icode|image}} or{{Icode|polyline}}. In situations such as displaying weather or traffic conditions over a map,  it would be less processor intensive to retrieve pre-built images from a tiler server rather than re-calculating and adding a large number of {{Icode| mapObjects}} on to the map {{Icode|display}}.  The cost of making a few extra round trips to retrieve data from a server will be much smaller than the equivalent client side processing of adding hundreds of thousands of objects onto the map.
+
For extremely large data sets, it no longer makes sense to add each data point as an individual {{Icode|marker}}, {{Icode|image}} o r{{Icode|polyline}}. In situations such as displaying weather or traffic conditions over a map,  it would be less processor intensive to retrieve pre-built images from a tiler server rather than re-calculating and adding a large number of {{Icode| mapObjects}} on to the map {{Icode|display}}.  The cost of making a few extra round trips to retrieve data from a server will be much smaller than the equivalent client side processing of adding hundreds of thousands of objects onto the map.
  
 
This article introduces a JavaScript library to '''overlay''' images over a map. It  handles the data calls to an arbitrary tile server which generates tiles  in the Normalised [http://en.wikipedia.org/wiki/Mercator_projection Mercator projection], which is the commonest format for online maps. It also handles the necessary attribution of the overlay images.  The code example retrieves Map Tiles from a tile server run by the National Library of Scotland . The mapping is based on out-of-copyright Ordnance Survey maps, dating from the 1920s to the 1940s.
 
This article introduces a JavaScript library to '''overlay''' images over a map. It  handles the data calls to an arbitrary tile server which generates tiles  in the Normalised [http://en.wikipedia.org/wiki/Mercator_projection Mercator projection], which is the commonest format for online maps. It also handles the necessary attribution of the overlay images.  The code example retrieves Map Tiles from a tile server run by the National Library of Scotland . The mapping is based on out-of-copyright Ordnance Survey maps, dating from the 1920s to the 1940s.
Line 41: Line 41:
  
 
[[File:nm_overlay.png]]
 
[[File:nm_overlay.png]]
+
 
 
== Summary ==
 
== Summary ==
  
 
Through using the functions in the [[Media:nm_overlay.zip|Code Example]] it is possible to display graphical data on a Nokia Map, an extension to cope with multiple bars per chart (shown below) is also included - feel free to adapt the code to your own use.
 
Through using the functions in the [[Media:nm_overlay.zip|Code Example]] it is possible to display graphical data on a Nokia Map, an extension to cope with multiple bars per chart (shown below) is also included - feel free to adapt the code to your own use.

Revision as of 14:38, 15 June 2012

Underconstruction.pngUnder Construction: (20120615112503) This article is under construction and it may have outstanding issues. If you have any comments please use the comments tab.

This article explains how to create a custom overlay and add data from your own tile server to the map.

Article Metadata
Code ExampleTested with
Devices(s): Internet Explorer, Google Chrome, Firefox
Compatibility
Platform(s): Web
Dependencies: Nokia Maps 2.2.0
Article
Keywords: Nokia Maps, Overlay, Map Provider, Data
Created: jasfox (15 Jun 2012)
Last edited: jasfox (15 Jun 2012)


Introduction

For extremely large data sets, it no longer makes sense to add each data point as an individual marker, image o rpolyline. In situations such as displaying weather or traffic conditions over a map, it would be less processor intensive to retrieve pre-built images from a tiler server rather than re-calculating and adding a large number of mapObjects on to the map display. The cost of making a few extra round trips to retrieve data from a server will be much smaller than the equivalent client side processing of adding hundreds of thousands of objects onto the map.

This article introduces a JavaScript library to overlay images over a map. It handles the data calls to an arbitrary tile server which generates tiles in the Normalised Mercator projection, which is the commonest format for online maps. It also handles the necessary attribution of the overlay images. The code example retrieves Map Tiles from a tile server run by the National Library of Scotland . The mapping is based on out-of-copyright Ordnance Survey maps, dating from the 1920s to the 1940s.


Nm overlay.png

Summary

Through using the functions in the Code Example it is possible to display graphical data on a Nokia Map, an extension to cope with multiple bars per chart (shown below) is also included - feel free to adapt the code to your own use.

326 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×