How to enable a Map view on an Entity

The content of the entity needs to be shown in a Map view. How can this be done in Origam ?

  1. Create a field in your entity with a data type Geography
  2. There should also be a text field in your entity which will describe the map point somehow
  3. Create a screen with a screen section configured like this:
  • IsMapSupported = True
  • MapLocationMember = a name of your geography field
  • MapTextMember = a name of your description field
  • MapLayers = a name of a map profile – see below
  1. Create a map profile so that a user can configure how the maps behave by himself. The map profile is stored in a system table AsapMap. Use the following example SQL statement in your deployment script.
  2. Use the Screens > __system > AsapMapLayer screen to set up a layer – use Mapnik (that is OpenStreetMaps)
  3. Use the Screens > __system > AsapMap to connect the layer to your map profile
  4. Now the map view should be set up.

A script for creating a map profile:

INSERT INTO AsapMap (Id, ReferenceCode, Description, RecordCreated)
VALUES (newid(), 'MapProfileName', 'User Description', getdate())