Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 11:13, 4 January 2013 by jasfox (Talk | contribs)

HERE Maps API - How to show a Place on a web page

From Wiki
Jump to: navigation, search



In this example we will use the places library of the Nokia Maps API to get information about a specific place and render that data on the web page with the use of the default template. There are a set of templates you can use for your purposes.

The information displayed consists of the name of the place next to a POI category icon, the address and contact details on a map centered to the POI icon.

To the results it is possible to add a list of reviews, ratings, accepted payment methods, photos taken.

The HTML page has a div element on which the information will be displayed.

In this simple example, we will only call the Place constructor using two parameters:

  • targetNode - indicates where to display the place data.
  • placeId - the id of the location for which data is to be fetched and displayed.


This is a fully working example code in HTML and JavaScript.

Example code

This is a full HTML & JavaScript example. Add in your own AppId and Token and feel free to modify and use for your own purposes.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Sharing a Place</title>
<script src="" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
{ color: #0099BB;
font-weight: normal;
font-size: 12px;
font-family: Arial;
text-decoration: none;
<div id="Place"></div><script type="text/javascript">
// Don't forget to set your API credentials
// Replace with your appId and token which you can obtain when you
// register on
nokia.Settings.set( "appId", "YOUR APP ID GOES HERE");
nokia.Settings.set( "authenticationToken", "YOUR AUTHENTICATION TOKEN GOES HERE");
var basicPlace = new nokia.places.widgets.Place({
placeId: '250u0ts2-78a011f821684d489e709ad6a3329fac',
targetNode: 'Place',
template: '' });
/* * There are 3 predefined templates you can use:
* ''
* ''
* ''
* 'nokia.general.placesmall'
* 'nokia.general.bubble'



The following screenshot shows the details of the place after making the search.


For more on the Nokia Maps API

Please check out the Nokia Maps API full documentation and API reference here:

You may also access the interactive API explorer

Article Metadata
Tested with
Devices(s): Internet Explorer, Google Chrome, Firefox, Safari
Platform(s): Web
Dependencies: Nokia Maps 2.2.3
Keywords: Nokia Maps, Places, JavaScript
Created: Maveric (20 Jun 2011)
Updated: jasfox (06 Feb 2012)
Last edited: jasfox (04 Jan 2013)
51 page views in the last 30 days.