According to the openlayers docs there is not an ImageLayer nor is there a
TileLayer it is Image and Tile
So change
const arcgis = new TileLayer({...
to
const arcgis = new Tile({...
and
const wms = new ImageLayer({...
to
const wms = new Image({...
and see how that goes
From: Daniel Yu <[email protected]>
Sent: Tuesday, 5 October 2021 1:43 AM
To: [email protected]
Subject: [Geoserver-users] wms layer not show up in openlayer
Hi,
Not sure I am allowed to post here regarding OpenLayer loading WMS from
geoserver. Please see below code. If I have only OSM and mems layers, then I
can see the map. But if I tried to load one of the three red box layers
(arcgis, wms and test3) I can not see any map.
Is there anyone know why it did not bring the WMS from Geoserver. Even I tried
ArcGIS world topo image but still no luck. I can see wms layer in Geoserver
layer view.
Thanks,
Daniel
[cid:[email protected]]
________________________________
CONFIDENTIALITY NOTICE AND DISCLAIMER
The information in this transmission may be confidential and/or protected by
legal professional privilege, and is intended only for the person or persons to
whom it is addressed. If you are not such a person, you are warned that any
disclosure, copying or dissemination of the information is unauthorised. If you
have received the transmission in error, please immediately contact this office
by telephone, fax or email, to inform us of the error and to enable
arrangements to be made for the destruction of the transmission, or its return
at our cost. No liability is accepted for any unauthorised use of the
information contained in this transmission.
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users