Namespaces
Variants
Actions

HERE Maps API - Add a map into your Blogger post

Jump to: navigation, search

This article explains how to add a map to your blog post.

MultiMediaTile.png
Article Metadata

Tested with
Devices(s): Google Chrome, Mozilla Firefox, Internet Explorer, Opera

Compatibility
Platform(s): Web Browser
Dependencies: HERE Maps 2.2.4

Article
Keywords: Blog, Blogger, Wordpress, HERE Maps, JavaScript
Created: Maveric (20 Jun 2011)
Updated: avnee.nathani (12 Jan 2012)
Last edited: jasfox (24 Apr 2013)

Word Press Plugins

A pair of WordPress plugins have been created here specifically to handle adding HERE Maps on their website:

Blogger

Blogger at http://blogger.com is a popular web blogging system. Here are the required steps for adding a Nokia Map to your blog post.

We will create a new blog article using the online tools of Blogger. The example code will include the required HTML, JavaScript and styling needed to display the map. If needed, modify the paths and name of the file to suite your purposes.

Follow these steps to add HERE Maps into your blog:

STEP 1 Open a new Blogger post editing window.

STEP 2 Copy and paste the following code into the post ('Edit HTML code' mode). Remember to add in your own AppId and Token.

<script type="text/javascript" src="http://api.maps.nokia.com/2.2.4/jsl.js" charset="utf-8">
<div id="map" style="width:400px; height:400px;">
<script type="text/javascript">
// Don't forget to set your API credentials
nokia.Settings.set( "appId", "YOUR APP ID GOES HERE");
nokia.Settings.set( "authenticationToken", "YOUR AUTHENTICATION TOKEN GOES HERE");
 
var map = new nokia.maps.map.Display(
document.getElementById("mapContainer"),
{
'zoomLevel': 10, //zoom level for the map
'center': [19.119, 72.8957] //center coordinates
}
);
</script>

STEP 3 Post it! - it's done!

Note:

If you omit the zoom level value it will default to 0 (zero) and if you omit center, the coordinates will default to zero coordinates as well (0,0).

You can edit the map properties and change e.g. the zoom level and map center.

For more on the HERE Maps API

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

You may also access the interactive API explorer

This page was last modified on 24 April 2013, at 19:02.
720 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved