Bing Map Element
The Bing Map Element allows you to embed an interactive Microsoft Bing Maps control in your eForm.
At runtime, this will display an interactive map which can be used by the user in the same way as if they access Bing Maps directly. They can zoom in and out, access different views, such as Aerial or Streetside, and drop a pin on the map to indicate a location.
As the developer, you can configure the map's startup properties to display the relevant location when the page loads, set the initial zoom level, select the view, Road, Aerial etc., and indicate directions.
In order to use the Bing Map Element you will need to join the Bing Maps Dev Center and obtain a Bing Maps Key. Microsoft do not charge for a key. You can sign up and obtain a key, if you don't already have one, at: http://www.bingmapsportal.com You will need to enter this key in the API Key property described below.
At runtime, the Element connects to Bing Maps in order to display and operate the map and, hence, requires an internet connection.
- When creating a form, if you add a Bing Map Element to the form, it will display as an empty blue rectangle with rounded corners. Only when a suitable API Key is entered will the interactive map, described above, appear.
During development, if you want to operate the map, you will need to turn Design Mode off and view your form in Preview mode.
Once you have placed a Bing Map Element on a page, you can edit the Element's properties to configure the Element for your requirements. Select the Element on the page to display its properties in the Properties Pane.
The following properties are available:
Visible and Disabled Properties
Height
Specify the height of the map as you want it to appear on your form, in pixels.
The properties in this category allow you to specify data mappings for this Element and to pre-configure the data properties, if required. For example you can specify the area you want to be displayed within the map when the form loads or specify a route to be marked on the map.
You can read values in for the Data properties from a Datasource or you can pre-configure the properties when developing your form. If you map a data item to a Datasource, you cannot enter your own value as well.
If you specify input mappings, at runtime values can be read in from your specified Datasource and used to configure the display of the map. If you pre-configure the values instead, these values will be used to configure the display of the map when the page loads. If you specify output mappings for the Data properties, you can write values specified by a user at runtime to the Datasource specified, e.g. if a user drops a pin on the map to indicate a location , you can retrieve and save that location's coordinates to the Datasource.
The list below describes the meanings of the Data properties. For information about configuring data mappings for these properties refer to the separate
Map Type
Specifies the type of map view used to display the map. The default type is Road, which displays the standard road map, but you can choose a different view from the options provided, such as Aerial or Streetside, if you prefer.
Latitude and Longitude
Coordinates identifying the central position of the map.
Zoom
Specifies the zoom level. The lower the number the greater the area shown within the boundaries of the Element and the less detail will be visible to the user. You will need to experiment with the value you enter here in order to work out the correct value for the required level of zoom.
Route Start and Route Finish
These properties allow you to display the route between two points on the map. You can specify the start and end points in the usual way for Bing Maps, e.g. postcode, town etc. When the page loads, the map will be positioned within the Element such that the entire route is visible. Leave these properties blank if you don't want to show a route.
Route Type
Allows you to specify how the route identified in the Route Start and Route Finish properties above, will be traversed - by car, on foot or using public transport.
Pin Latitude and Pin Longitude
Store the coordinates identifying the location of the last pin dropped on the map by the user. You cannot specify an initial pin position except using the Drop Pin In Centre property on the Advanced tab,
.
Behaviour Category
Drop Pin in Centre
If this property is selected, a pin will be displayed in the centre of the map when the page loads. Deselect the option if you don't want the pin to be displayed.
Drop Pin on Click
If this property is selected, a user can display a pin anywhere on the map by clicking on the map at the appropriate point. Multiple pins can be displayed, although only the last pin's location is saved. Deselect the option if you don't want users to be able to drop pins on the map.
Configuration Category
API Key (Required)
Enter your Bing Maps Key, obtained from the Bing Maps Dev Center. Without a valid key, the Bing Map Element will not work. You will need to reload the form after entering your Key, to make the Key take effect.
Styles Category
Map
Allows you to assign a style to the map Element, e.g. to set a border around the Element.