HERE Maps API - Add a map into your Blogger post
m (Jasfox - Updated example to use Nokia Maps API 2.2) |
m (Jasfox - Updated example to use Nokia Maps API 2.2) |
||
| Line 3: | Line 3: | ||
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | ||
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| − | |devices=Google Chrome | + | |devices=Google Chrome, Mozilla Firefox, Internet Explorer, Opera |
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| − | |platform= | + | |platform= Web Browser |
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| − | |dependencies=Nokia Maps 2. | + | |dependencies=Nokia Maps 2.2.0 |
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | |signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| Line 25: | Line 25: | ||
{{SeeAlso| | {{SeeAlso| | ||
* [http://api.maps.nokia.com/ Nokia Maps API] | * [http://api.maps.nokia.com/ Nokia Maps API] | ||
| − | * [http://api.maps.nokia.com/ | + | * [http://api.maps.nokia.com/en/playground/examples/maps/getting_started/basic.html Basic Map Example] |
}} | }} | ||
| Line 89: | Line 89: | ||
You may also access the interactive Nokia Maps API playground, | You may also access the interactive Nokia Maps API playground, | ||
| − | * http://api.maps.nokia.com/ | + | * http://api.maps.nokia.com/en/playground/env/desktop/ |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 17:58, 13 April 2012
Article Metadata
Tested with
Compatibility
Article
See Also
This article explains how to add a map to your blog post.
Contents |
Introduction
Blogger at http://blogger.com is one of the most popular web blogging systems. To have a map inside a blog post would be cool, let's go through the steps of adding Nokia Maps to your blog post.
Prerequisites
Nokia Maps API supported web browser (basically any modern web browser)
A new or existing account at Blogger.com (http://blogger.com)
Implementation
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.
Example code
Follow these steps to add Nokia 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)
<script type="text/javascript" src="http://api.maps.nokia.com/2.2.0/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 Nokia Maps API
Please check out the Nokia Maps API full documentation and API reference here:
You may also access the interactive Nokia Maps API playground,

