Adding a WMS service from LizardTech express Server with Javascript API

1463
8
05-17-2012 08:41 AM
JeffPace
MVP Alum
anyone have any luck doing this? i dont think i am getting my parameters correct.  A working example would be awesome.

thank you
0 Kudos
8 Replies
derekswingley1
Frequent Contributor
Other than working from the sample that shows how to use a WMS as a layer, I think you're on your own here. I've never used LizardTech Express Server.

Is your service public?
0 Kudos
JeffPace
MVP Alum
it will be shortly.  I got it

had to use version 1.1.1 as version 1.3 uses "CRS" instead on "SRS" in the URL, and had to fake a 102100 coordinate system for my WMS service.
0 Kudos
derekswingley1
Frequent Contributor
Glad you got it working!
0 Kudos
JeffPace
MVP Alum
Derek,
I have this all intergrated now, but does it make sense that no matter the layer order, my WMS service always draws on top? Even draws on top of my graphics and dynamic services. 

In fact, I can draw a polygon graphic underneath it???!??!?!

Thanks for your help
0 Kudos
derekswingley1
Frequent Contributor
That doesn't seem right. Are you using the WMSLayer class? Graphics and Feature Layers should always draw on top of dynamic (including WMS) and tiled services.
0 Kudos
JeffPace
MVP Alum
That doesn't seem right. Are you using the WMSLayer class? Graphics and Feature Layers should always draw on top of dynamic (including WMS) and tiled services.


I opened a help ticket.  I tried 2.5 through 2.8 , and with both an ESRI ArcGIS server service accessed via WMS and a Lizardtech WMS service.  All draw on top of all dynamic layers and on top of the graphics layer,

Very very odd.

When i alert the layerIds, the WMS service is index 1 of 8.  so it should be on top of my background layer 0, but under everything else.
0 Kudos
JeffPace
MVP Alum
Ok best i could do for a public demo

http://www.mymanatee.org/gisapps/mapviewer-test/index.jsp?type=test&layervis=Aerial%20Grid&widgetOn=...

The aerial is a background tiled layer added first.  Then the WMS Service is added (its the "2011" layer controlled by the slider at the bottom.  the other items on the slider are tiled layers).  Then the dynamic layer is added "aerial grid". 

Finally i turned the draw tool on, you can draw any graphic and it will draw under the WMS layer.

Just to rule out any third part issue, this is a 10sp4 WMS layer with data directly from SDE.  ESRI products only.

The WMS layer is actually in a DIV after the graphics layer.  No divs have z-indexs, so it draws on top of everything.

config for WMS

          <mapservice label="2011 Aerials" type="wms" catalog="0" visible="true" alpha="1" icon="assets/images/icons/i_shuttle.png">http://www.mymanatee.org/arcgis/services/base-map/aerials-2011-wms/MapServer/WMSServer?request=GetCapabilities</mapservice>



code to create WMS layer


 if (mapServiceInfo.type === "wms") {
                    var layerInfo = new esri.layers.WMSLayerInfo({name:mapServiceInfo.layer,title:mapServiceInfo.layer,spatialReference:new esri.SpatialReference({wkid:102100})});
                    var resourceInfo = {
                        extent: new esri.geometry.Extent({"xmin":-9214584.290114,"ymin":3145848.430227,"xmax":-9133734.228469,"ymax":3208214.597832,"spatialReference":{"wkid": 102100}}),
                        layerInfos: [layerInfo],
                            version:"1.3.0"
                        };
                        layer = new esri.layers.WMSLayer(mapServiceInfo.url, {
                            resourceInfo: resourceInfo,
                            id: mapServiceInfo.label,
                            transparent: parseFloat(mapServiceInfo.alpha),
                            visible: mapServiceInfo.visible,
                            visibleLayers: [mapServiceInfo.catalog],
                            type: "wms"
                    });
0 Kudos
by Anonymous User
Not applicable

Hey Jeff Pace‌ - also trying to get a LizardTech WMS service running. I am trying to add from their demo page using Arcgis Api for JavaScript 3.14, but no dice. Any ideas?

var wmsTest = new WMSLayer("http://demo.lizardtech.com/lizardtech/iserv/ows", {
              format: "png",
              resourceInfo: {
                  copyright: "lizardtech",
                  description: "test",
                  extent: new Extent(-81.248255,29.572644,-82.908008,26.740052, new SpatialReference({ wkid:4326 })),
                  featureInfoFormat: "text/html",
                  getFeatureInfoURL: "http://demo.lizardtech.com/lizardtech/iserv/ows",
                  getMapURL: "http://demo.lizardtech.com/lizardtech/iserv/ows",
                  layerInfos: [
                        new WMSLayerInfo({
                           name: "Florida_Mosaic",
                           title: "Florida_Mosaic",
                           queryable: false,
                           showPopup: false
                        })
                  ],
                  spatialReferences: [4326],
                  version: "1.3.0"
               },
               visible: true
         });
0 Kudos