Skip to content
Advertisement

HERE map controls not loading in React

I’m trying to display zoom in and zoom out control in HERE maps in React. I’ve followed the steps mentioned in the documentation, but I’m not getting any help from there.

I’ve followed everything in the link: https://developer.here.com/tutorials/react/

My map component link: https://gist.github.com/pranay414/84f5fe4ed1b704c1ff34409a957c37d7

This is the error message I’m getting: enter image description here

Advertisement

Answer

I’m trying to display zoom in and zoom out control in HERE maps in React. I’ve followed the steps mentioned in the documentation, but I’m not getting any help from there.

The zoom control is there, but you don’t see it because the tutorial misses one thing, namely

<link rel="stylesheet" type="text/css" href="https://js.api.here.com/v3/3.1/mapsjs-ui.css" />

So please add it to index.html and remove this line

H.ui.ZoomControl();
Advertisement