Hexagon Geospatial
MENU

M.App Enterprise

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
Occasional Contributor
Posts: 18
Registered: ‎12-04-2018
Accepted Solution

Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

Hi there,

 

I'm new to the mobile app but is there a way that can show boundary data inside the map just like the feature analyzer from the browser version?

 

Thanks,

Jovlinda

Frequent Contributor
Posts: 114
Registered: ‎05-25-2016

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

if you need show boundary data in the mobile map you should add a polygon vector layer to it:

 

<NativeMap xmlns="clr-namespace:AppShell;assembly=AppShell">
  <NativeMap.Layers>
    <PolygonVectorLayer Entity="Boundary" Color="#FF0000" FillColor="#88FF0000"
                        SelectionColor="#00FF00" SelectionFillColor="#8800FF00" />
  </NativeMap.Layers>
</NativeMap>

See the documentation for more info:

https://community.hexagongeospatial.com/t5/M-App-Enterprise-Tutorials/M-App-Enterprise-Mobile-Docume...

Occasional Contributor
Posts: 18
Registered: ‎12-04-2018

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

Thank you for the reply

 

The configuration you shared is the one I have added in my own. There's another question, is it possible to show the data from the existing database?

 

Thanks,

Jovlinda

Staff
Posts: 609
Registered: ‎11-12-2015

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

Hi Jovlinda,

 

If you haven't already it is good idea to review the MAE Mobile Tutorial

 

Of course the data from existing database can be added as a feature in Mobile M.App. It only needs the Datasource to be specified for the M.App and the table configured as an Entity in the Shell.xaml.

There is more information in the MAE Mobile Tutorial Part 2 as well and Lab 3 gives good example of setup while the attachment to it 'Labs.zip' also provides an example configuration where this can be seen.

 

Here is example of where I have specified a table 'Crime' from an existing database as Entity in the Shell.xaml

shellentities.PNG

 

Then in the map I can call that Entity 'Crime_ent' as a feature layer

shellmapentities.PNG

 

HTH

Occasional Contributor
Posts: 18
Registered: ‎12-04-2018

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

Thank you Sclow.

 

I mostly refer to the Mobile App Tutorial and Mobile App Documentation for my configuration. But I still have issues that the feature layer won't show on the map when I test it out.

 

This is my Shell.xaml and reg_parcels_W is the table from the existing database that I had.

<Shell.Entities>
        <Entity Id="Registered_Parcel" Table="reg_parcels_W" Key="ogc_fid" SyncType="None" >
			<Field Name="ogc_fid" Type="Guid" IsRequired="True" />
			<Field Name="gid" Type="Guid" />
			<Field Name="title_num" Type="String" />
			<Field Name="la_num" Type="String" />
			<Field Name="old_title" Type="String" />
			<Field Name="land_cat" Type="String" />
			<Field Name="parcel_des" Type="String" />
			<Field Name="gaz_num" Type="String" />
			<Field Name="ls_ref" Type="String" />
			<Field Name="plan_num" Type="Guid" />
			<Field Name="comp_area" Type="Integer" />
			<Field Name="surv_area" Type="Integer" />
			<Field Name="area_uom" Type="String" />
			<Field Name="grid_type" Type="String" />
			<Field Name="grid_num" Type="String" />
			<Field Name="sp_rsp_num" Type="String" />
			<Field Name="surv_ref" Type="String" />
			<Field Name="surv_name" Type="String" />
			<Field Name="surv_date" Type="DateTime" />
			<Field Name="app_date" Type="DateTime" />
			<Field Name="ds_name" Type="String" />
			<Field Name="data_src" Type="String" />
			<Field Name="remark" Type="String" />
			<Field Name="updated" Type="DateTime" />
			<Field Name="posted" Type="DateTime" />
			<Field Name="ppht_ref" Type="String" />
			<Field Name="district" Type="String" />
			<Field Name="plan_key" Type="String" />
			<Field Name="title_type" Type="String" />
			<Field Name="job_title" Type="String" />
			<Field Name="topologised" Type="String" />
			<Field Name="active" Type="String" />
			<Field Name="GEOM" Type="Geometry" />
		</Entity>

And in the NativeMap.xaml I call 'Registered_Parcel' as the feature layer

<MarkerVectorLayer Entity="Registered_Parcel" Icon="Map.Pin.png" ZIndex="0" MinimumZoomLevel="13" MaximumZoomLevel="22" >
			<FeatureInfo Title="Feature Layer" Detail="@{gid}">
				<NavigateShellAction Icon="Edit" >
					<Parameter Name="Id" Value="@{Guid}" />
				</NavigateShellAction>
				<NavigateSelectionAction/>
			</FeatureInfo>
</MarkerVectorLayer>

The attachment is what it looks like on the map

Staff
Posts: 609
Registered: ‎11-12-2015

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

[ Edited ]

Hi jovlinda,

 

Perhaps the issue is you are using a Polygon feature as a 'MarkerVectorLayer' symbolized with a pin .png icon.

My post was given as an example of using a feature class from the database and the 'Crime_ent' feature layer in my case is a point feature class, which makes sense as a vector marker layer with pin icon. 

 

In case of polygon you can refer to the example code S.Fonseca provided in a previous reply using your 'Registered_Parcel' as the entity of a <PolygonVectorLayer>.

 

HTH

Frequent Contributor
Posts: 114
Registered: ‎05-25-2016

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

Another thing I noticed is that you are using ZIndex="0" In your code. I´m not sure, but if you set more than one layer to the same index it may cause problems. Have you tried to set another value or even maybe no value at all?. In the same subject, I’m not sure and probably it is not the case but in some frameworks, index 0 is used by the base map and forcing any layer to the 0 level may result in having the layer under the basemap.

Occasional Contributor
Posts: 18
Registered: ‎12-04-2018

Re: Mobile - Can the M.App Mobile Enterprise show boundary data in the map?

[ Edited ]

Update: I just solved it. Apparently, I need to add the EpsgCode in the Geometry field.

 

Thanks,

Jovlinda

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.