Skip to content

Arcgis mapview issue with anywidget: [esri.views.MapView] #container element not found #271

Answered by iisakkirotko
icduck asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @icduck,

If you put a timeout on drawing the map, so that the container is added in before the map is appended to it, the map loads in. However after that you run into some other weirdness, with some FBO element resizing constantly, and your map flying beyond the screen quite rapidly. I'm not sure why this happen, perhaps you have some idea.

So I did something like

function makeMap(){
    var map = new Map({
        basemap: "topo-vector" 
    });
    var view_map = new MapView({
        container:"viewDiv",
        map: map
    });
}
view.el.appendChild(container);
setTimeout(makeMap, 100);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@icduck
Comment options

@icduck
Comment options

Answer selected by icduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants