Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

HERE Maps API - How to draw a circle

From Wiki
Jump to: navigation, search

This article explains how to draw a circle on HERE Maps.

Article Metadata
Code Example
Source file: [circle.html]
Tested with
Devices(s): Internet Explorer, Firefox, Google Chrome, Safari
Compatibility
Platform(s): Web browser
Dependencies: HERE Maps 2.2.4
Article
Keywords: HERE Maps, JavaScript, shapes
Created: Maveric (21 Jun 2011)
Updated: avnee.nathani (31 Dec 2011)
Last edited: jasfox (20 Dec 2013)

Contents

Prerequisites

HERE Maps API supported web browser (basically any modern web browser)

Important note about maps credentials

Nokia provides several services options within the Maps API offering. The service is free to use, but you must obtain and use authentication and authorization credentials to use the services. Please read the Terms and Conditions and check the Pricing Plans page to decide which business model best fits your needs. Authentication requires unique Maps API credentials, namely an AppId and a token. You can get these credentials free for free following the instructions here

Implementation

The API definition:

new nokia.maps.map.Circle (center, radius, props)

In the example below, we create a simple circle with coloured fill and outline.


Example code

map.objects.add(new nokia.maps.map.Circle(
// The center or the circle will be on longitude 50.0361,
// latitude 8.5619
[19.15, 73.91],
// The radius of the circle in meters
450000,
{
pen: {
strokeColor: "#829f", // Color of the perimeter
lineWidth: 2
},
brush: {
color: "#829f" // Color of the circle
}
}
));

NokiaMapsCircle.png

A working example displaying a circle over India can be found at:

http://heremaps.github.io/examples/examples.html#circle

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

Tested with

  • Google Chrome 20.x
  • Mozilla Firefox 12.x
This page was last modified on 20 December 2013, at 15:54.
296 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.

×