eton dolittle
eton dolittle

Reputation: 221

How to rotate marker in Nokia HERE javascript API?

I'm using Nokia HERE javascript library to put a marker on the map. I'm using a png image to create an icon for marker. I'm able to see the marker/image/icon on map successfully after following the documentation here - http://developer.here.com/api-explorer#maps-js/create-dom-marker

Next, I would like to rotate this marker by few degrees. I see similar feature in Google Maps as posted here - How to rotate a marker in Google Maps? but I don't see any way to supply rotation in degrees in HERE APIs. So is there any way to rotate a marker in Nokia HERE Javascript framework? A sample code or fiddle example would be greatly helpful.

Upvotes: 0

Views: 851

Answers (1)

Jithin Krishnan
Jithin Krishnan

Reputation: 1044

You can use the transform property to simply rotate the marker you have created. For example on the example http://developer.here.com/api-explorer#maps-js/create-dom-marker something like the following should do the trick

innerElement.style.webkitTransform='rotate(90deg)';
innerElement.style.msTransform='rotate(90deg)';
innerElement.style.transform='rotate(90deg)';

Upvotes: 0

Related Questions