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
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: M.App Enterprise Mobile Offline Mode

Thanks, creating a View and using the Studio I have imported an area polygon and added it to the mobile m.app. 

 

I've opened the app on an android device, cleared local data and logged back in and tried to follow the steps provided previously by Stefano but I still get no areas listed after tapping synchronise however I do now see my osm and wms layers I've configured in the app.

 

Any suggestions why the area isn't showing the mobile app?

Highlighted
Staff
Posts: 19
Registered: ‎10-29-2018

Re: M.App Enterprise Mobile Offline Mode

Have you assigned one of your imported areas to your user or just to the mobile app?

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: M.App Enterprise Mobile Offline Mode

I hadn't realised there was further configuration in the Studio after importing the area. I have now assigned the area to the User and Role I'm logging into the app with.

 

I still can't see area polygon listed. I cleared local data as well when logging into after making this change.

Highlighted
Staff
Posts: 19
Registered: ‎10-29-2018

Re: M.App Enterprise Mobile Offline Mode

Can you try to remove the area from the mobile app, assign it only to the role and check if it works?

 

The app area is intersected with all your assigned areas and that is probably why you don't see an area.

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: M.App Enterprise Mobile Offline Mode

That has worked! Now I can select the area during login to the app.

 

I am not sure if the mapping is being downloaded when I tap synchronise, the downloaded maps section shows a count of tiles but a size of 0mb. Going offline I'm still able to zoom around displaying google maps but I'm not sure if this cache from my previous sessions and not related to the synchronisation I just did. 

 

Shouldn't there be a value higher than 0mb specificied in the size?

Highlighted
Staff
Posts: 19
Registered: ‎10-29-2018

Re: M.App Enterprise Mobile Offline Mode

If you have a custom tile source (e.g.: a WMTS) you need to go to synchronization view, check your tile source, select an area and click on the orange synchronize button.

 

You should see a synchronization progress in the header of the tile source table.

 

All tiles you visit are also cached on demand.

 

If you are only using the native map without a custom tile source, you can download the cache for your region in Google Maps and it should also work in M.App Enterprise Mobile.

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: M.App Enterprise Mobile Offline Mode

I've only seen in the available documentation samples how to add a WMS, there isn't an example for a WMTS. Do you know what the correct URL syntax would be to add a WMTS from a M.App Enterprise "My Geoservices"?

 

I can't get a WMS to display from a M.App Enterprise "My Geoservices" either in the mobile app. The same WMS displays fine in Geospatial Portal. 

 

Thanks for explaining how the caching on native map data works, I will test this.

 

Regards,

Colin

Highlighted
Staff
Posts: 19
Registered: ‎10-29-2018

Re: M.App Enterprise Mobile Offline Mode

I'll add an example to the documentation.

 

Make sure the projection of your WMTS/WMS is EPSG:3857.

 

WMTS Url should look like this:

 

https://<yourserver>/api/v2/geoservices/wmts/<tenant>/<wmtsname>/<cacheversion>/google3857/{z}/{y}/{x}

Highlighted
Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: M.App Enterprise Mobile Offline Mode

I'm guessing the correct WMTS URL should be https://<yourserver>/api/v2/geoservices/wmts/<tenant>/<wmtsname>/{cacheversion}/google3857/{z}/{y}/{x}

 

I couldn't find a "cacheversion" value anywhere so is that added by the app?

 

Unfortunately both the Geoservices WMS and WMTS display fine in Geospatial Portal in EPSG:3857 but won't display in the mobile app. Here is my configuration:

 

Shell.xaml

 

<UrlTileOverlay Id="AreasWMTS" TileWidth="256" TileHeight="256" MinimumZoomLevel="0" MaximumZoomLevel="20"
            Url="https://<!website!>/api/v2/geoservices/wmts/MAPPE_DEMO/mobiledata/{cacheversion}/google3857/{z}/{y}/{x}" />
		<UrlTileOverlay Id="Areas" TileWidth="512" TileHeight="512" MinimumZoomLevel="0" MaximumZoomLevel="20"
            Url="https://<!website!>/api/v1/geoservices/wms/MAPPE_DEMO/mobiledata?version=1.3.0&amp;service=WMS&amp;request=GetMap&amp;crs=EPSG:3857&amp;bbox={bbox}&amp;width={width}&amp;height={height}&amp;layers=mobiledata&amp;styles=&amp;format=image/png&amp;transparent=true" />

NativeMap.xaml

 

	<NativeMap.Layers>
		<MarkerVectorLayer Entity="Locations" Icon="Map.Pin.png"  ZIndex="3" MinimumZoomLevel="10" MaximumZoomLevel="22">
			<FeatureInfo Title="Name: @{name}" Detail="Description: @{description}">
				<NavigateShellAction Icon="Edit" Target="LocationForm">
					<Parameter Name="Id" Value="@{id}" />
				</NavigateShellAction>
			</FeatureInfo>
		</MarkerVectorLayer>
		<TileLayer TileRef="Areas" />
		<TileLayer TileRef="AreasWMTS" />
		<NativeLayer Type="Hybrid" />
		<TileLayer TileRef="OSM" />
	</NativeMap.Layers>
Highlighted
Staff
Posts: 1,064
Registered: ‎10-18-2015

Re: M.App Enterprise Mobile Offline Mode

This is a sample of the WMTS provided by Apollo Core:

 

http://<yourserver>/erdas-iws/ogc/wmts/<tenant>?SERVICE=WMTS&amp;REQUEST=GetTile&amp;VERSION=1.0.0&amp;LAYER=<layername>&amp;STYLE=default&amp;FORMAT=image/jpeg&amp;TILEMATRIXSET=OGC:1.0:GoogleMapsCompatible&amp;TILEMATRIX={z}&amp;TILEROW={y}&amp;TILECOL={x}

Stefano Turcato
Presale Engineer
Hexagon Geospatial