@arcgis/core: unable to set basemap center
See original GitHub issue@arcgis/core version 4.21.2
I was able to bring the esm-samples\jsapi-angular-cli
project into my own angular project to display the map in a component.
I changed the “portalItem” base layer for the WebMap object to basemap: 'hybrid'
, but it appears that all of the other common attributes are gone for web map, e.g. center, zoom etc. There doesn’t seem to have anyway to set its center either after instantiation.
I tried to use Map
object, but it doesn’t have the .when()
event handler.
Actually, is there a more significant example program using @arcgis/core beyond this simple map display? I mean that include loading layers, display attribute tables, select features, generate features etc.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Error while loading loading map. - Page 2 - Esri Community
Basemap ] #load() Failed to load basemap (title: 'Basemap', id: 'gray-vector') TypeError: t is not a constructor Zoom.js:5 Uncaught (in ...
Read more >MapView | API Reference | ArcGIS Maps SDK for JavaScript ...
Programmatic navigation. You can set the initial extent (or visible portion of the map) by using either a combination of center and scale...
Read more >Restricting base map on specific extent in ArcGIS API for ...
I have set the US extent code in my application but when I zoom out then I can see the whole world map...
Read more >@arcgis/core - npm
ArcGIS API for JavaScript: A complete 2D and 3D mapping and data visualization API. Latest version: 4.25.5, last published: a month ago.
Read more >Esri/esri-loader: A tiny library to help load ArcGIS API ... - GitHub
then(([Map]) => { // create map with the given options at a DOM node w/ id 'mapNode' let map = new Map('mapNode', {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Although in the screenshot above it does look centered on San Francisco which is
[-122.260544024, 37.81939394]
. Maybe you’re looking for the zoom property?Hi @t-zhai have you been able to solve the first issue that you reported above? As @odoe mentioned, can you provide a simple/minimal github repository that demos your basic app?
With regards to the buttons being out of place, it’s possible the CSS isn’t set, take a look at how we set it in our sample: https://github.com/Esri/jsapi-resources/blob/master/esm-samples/jsapi-angular-cli/src/app/app.component.css.