M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 60
Registered: ‎11-15-2018
Accepted Solution

Mobile App problems with WMS

Hello,

we have problems to configure WMS in Mobile APP.
According to documentation 'Using a WMS tile source'
https://community.hexagongeospatial.com/t5/M-App-Enterprise-Tutorials/M-App-Enterprise-Mobile-Docume...
we configured WMS in the following way:

 

<Shell.Tiles>
<UrlTileOverlay Id="wms" TileWidth="4096" TileHeight="4096" 
Url="http://www.lfu.bayern.de/gdi/wms/hwrk/ueberschwemmungsgebiete?version=1.3.0&amp;service=WMS&amp;request=GetMap&amp;format=image/png&amp;crs=EPSG:4326&amp;width=4096&amp;height=4096&amp;layers=hwgf_hqhaeufig&amp;bbox=46.781936,8.205988,51.030572,14.641022&amp;styles=" />
</Shell.Tiles>



We changed parameters, omitted parameters etc but without success. We can't see anything of the WMS picture.

 

WMS Link works because we can see a picture in a normal browser with the following link:
http://www.lfu.bayern.de/gdi/wms/hwrk/ueberschwemmungsgebiete?version=1.3.0&service=WMS&request=GetM...

 

Does any body has an idea?
Thank you very much,
regards Iris

Highlighted
Staff
Posts: 105
Registered: ‎10-25-2016

Re: Mobile App problems with WMS

Hi Iris,

 

can you change crs to EPSG:3857?

 

You should also keep the {bbox}, {width} and {height} placeholders.

 

Regards

Christian

Highlighted
Contributor
Posts: 60
Registered: ‎11-15-2018

Re: Mobile App problems with WMS

thanks for your hint.

 

We changed  it to the following:

	<Shell.Tiles>
		<UrlTileOverlay Id="wms" TileWidth="512" TileHeight="512" MinimumZoomLevel="0" MaximumZoomLevel="20"
                  Url="http://www.lfu.bayern.de/gdi/wms/hwrk/ueberschwemmungsgebiete?version=1.3.0&amp;service=WMS&amp;request=GetMap&amp;format=image/png&amp;crs=EPSG:3857&amp;width={width}&amp;height={height}&amp;layers=hwgf_hqhaeufig&amp;bbox={bbox}&amp;styles="  />
	</Shell.Tiles>

we also tested with and without ZoomLevel and changed values by TileWidth/TileHeight, but without success.

 

Regards, Iris

 

Highlighted
Staff
Posts: 105
Registered: ‎10-25-2016

Re: Mobile App problems with WMS

Sorry EPSG:4326 is correct.

 

I've tested it and I can see the WMS.

 

My layer configuration:

 

 

<NativeMap.Layers>
    <NativeLayer Type="Roads" />
    <NativeLayer Type="Satellite" />    
    <TileLayer TileRef="wms" IsActive="True" />	
</NativeMap.Layers>

 

I've also added transparent=true to WMS url.

 

Regards

Christian

Highlighted
Contributor
Posts: 60
Registered: ‎11-15-2018

Re: Mobile App problems with WMS

We returned back to EPSG 4326, added transparent in URL and added your NativeMap.Layers Code but then we get the following error:

 

Cannot set unknown member '{http://schemas.snapworx.at/appshell/2016/xaml}NativeMap.Layers

 

 

Our code:

 <Shell.Tiles>
<UrlTileOverlay Id="wms" TileWidth="512" TileHeight="512" MinimumZoomLevel="0" MaximumZoomLevel="20"
Url="http://www.lfu.bayern.de/gdi/wms/hwrk/ueberschwemmungsgebiete?version=1.3.0&amp;service=WMS&amp;request=GetMap&amp;format=image/png&amp;crs=EPSG:4326&amp;width=4096&amp;height=4096&amp;layers=hwgf_hqhaeufig&amp;bbox=46.781936,8.205988,51.030572,14.641022&amp;transparent=true&amp;styles=" />
</Shell.Tiles>

<NativeMap Id="MeldungMap" Title="Meldungskarte" Center="xxxx" ZoomLevel="15" MapType="Roads" View="MeldungMap"> <NativeMap.Layers> <NativeLayer Type="Roads" /> <NativeLayer Type="Satellite" /> <TileLayer TileRef="wms" IsActive="True" /> </NativeMap.Layers> </NativeMap>

Thanks, Iris

Highlighted
Staff
Posts: 105
Registered: ‎10-25-2016

Re: Mobile App problems with WMS

The layer definition should be in your MeldungMap.xaml instead of your Shell.xaml.

Highlighted
Contributor
Posts: 60
Registered: ‎11-15-2018

Re: Mobile App problems with WMS

Now it works !!!

(I configured layer definition in MeldungMap and removed a mistake in URL - I  still used values instead of placeholders )

 

Thank you very much for the great support!

Regards Iris

Highlighted
Frequent Contributor
Posts: 117
Registered: ‎11-29-2015

Re: Mobile App problems with WMS

Hi Iris,

 

Do you remember the mistake of the URL?

I am also facing some problems according to WMS within the mobile App. Maybe you can send me the URL you have successfully implemented?

 

Many Thanks and regards,

Hella

Highlighted
Contributor
Posts: 60
Registered: ‎11-15-2018

Re: Mobile App problems with WMS

Hi Hella,

 

this config for WMS works for us:

<Shell.Tiles>
		<UrlTileOverlay Id="wms_Überschwemmungsgebiet" TileWidth="512" TileHeight="512" MinimumZoomLevel="0" MaximumZoomLevel="20"
                  Url="http://www.lfu.bayern.de/gdi/wms/hwrk/ueberschwemmungsgebiete?version=1.3.0&amp;service=WMS&amp;request=GetMap&amp;format=image/png&amp;crs=EPSG:4326&amp;width={width}&amp;height={height}&amp;layers=hwgf_hqhaeufig&amp;bbox={bbox}&amp;transparent=true&amp;styles="  />
</Shell.Tiles>

My mistake before was,  i configured some parameter f.e. 'width' with special values like width=4096  instead of using width={width}

 

Good luck,

regards, Iris