Map

Used to show an embedded map inside the app without navigating to a third party mapping app. Pins shown on the map can represent any number of different entities. Each pin can support an information card that will be shown when the pin is clicked.

Supported Elements & Properties for Pins

Use the count keyword to specify a function that will return the number of items that will be displayed in the pins (parameters can be passed in). This is useful when your entity set contains some invalid data (i.e. items without latitude/longitude) or when the data is returned by a function instead of an entity set.

Marble

page WorkOrdersMapPage using WorkOrdersSet {
   label = "Work Orders";   
   map WorkOrdersMap;
}

map WorkOrdersMap for WorkOrder {

    // Show all work order pins using WorkOrdersSet  from the page
    pin WorkOrderPin {
      label = "${WoNo} - ${Description}"; // Label is shown on the map - can also be not provided
      card WorkOrderCard; 

      latitude WoLatitude;
      longitude WoLongitude;

      emphasis Complementary2 = [Objstate = "NEW"];
      emphasis Complementary3 = [Objstate = "ACCEPTED"];
      emphasis Complementary6 = [Objstate = "TRAVELLING"];
      emphasis Complementary1 = [Objstate = "ON_SITE"];
    }

    // Also show customer pins using the Customers entity set
    pin CustomerPin using Customers {
      label = "${CustomerName}";

      count GetCustomersCount();

      latitude CustLatitude;
      longitude CustLongitude;

      emphasis Blue = [true];
    }

    // Also show all warehouses returned by the GetWareHousesFunction function
    pin WarehousePin using GetWareHousesFunction {
      label = "${Description}";
      card WarehouseCard;

      latitude Latitude;
      longitude Longitude;

      emphasis Green = [true];
    }
}

Maps must have at least on pin declared. Every pin must have a latitude and longitude defined. card is optional. label is optional. for WorkOrder is optional if every pin has a using but is mandatory if one does not. emphasis is optional. Defining the entity set/function for the pin with the using keyword is optional but if it is not defined, the entity set/function/query of the page will be taken as the data source. For an example, if there are multiple pins without the using keyword, all of them will display the same set of data.

Application Parameters

EMBEDDED_MAPS_ANDROID = Disabled/Esri (default Disabled)

EMBEDDED_MAPS_IOS = Disabled/Esri (default Disabled)

EMBEDDED_MAPS_WINDOWS = Disabled/Esri (default Disabled)

Esri is currently the only map tile provider supported. Others may be added in the future depending on demand.

Limitations

Although any number of pins can be declared in Marble, the total number of pins that will be displayed on the map element is limited to 250 to ensure the performance of the map remains acceptable on all platforms. If you want to display a large number of pins on the map it is recommended that you break up your data into more specific sets and then use multiple maps to show them.

This feature will not function correctly when the device is offline as the map tiles are provided by a third party, requiring an internet connection.