You can use Geo Location prompts to filter data in a report, document, or Map widget by using the iPhone or iPad's current geographical location. For example, a Map widget displays several locations as markers on the map display. You can choose to display only those location markers that are in the same state, city, or zip code as the iPhone or iPad's current location.
You can:
Automatically use the iPhone or iPad's current longitude and latitude to filter report results. To do this, you must define two Value prompts, one for latitude and one for longitude. The prompts are then automatically answered and are not presented to the user in the iPhone or iPad interface.
Filter a list of attribute elements in a prompt using the current location of the iPhone or iPad. For example, you can filter a list of answers in an Attribute Element prompt, to display a list of only the stores located in the current city. To do this, you must define an Attribute Element prompt with the display style set to Geo Location.
The location name that is returned by a Geo Location prompt is based on Google’s geocoding. The prompt determines your longitude and latitude using your iPhone or iPad’s GPS receiver, and passes this information to Google Maps to return information about your location.
To use an Attribute Element prompt to filter attribute elements based on the location of the iPhone or iPad, you must provide a location mapping attribute that maps Google's geocoded location information to the data you want to filter. For example, if you want to filter a list of stores by the state in which the iPhone or iPad is located, you can provide a location mapping attribute that contains separate attribute forms for state location information as returned by Google, and information (such as the store name and store address) for each store. The location mapping attribute must store location information in the same format that Google uses to provide the location of the user.
The attribute that provides the list of attribute elements that are filtered and displayed by the Geo Location prompt, also called the display attribute, does not have to be the same as the location mapping attribute. For example, the Customer State is both the display attribute and the location mapping attribute. When the prompt is displayed on an iPhone or iPad, the list of prompt answers is filtered to display the current state, as shown in the image below on the left. Instead, if the display attribute is the Store attribute, and the location mapping attribute is Customer State, the list of prompt answers is filtered to display the stores in the current state, as shown in the image below on the right. Users can select stores from the list for which to display data.
For general information about prompts, see About prompts. For more information on iPhone and iPad prompts, including the Geo Location prompt, see Creating iPhone and iPad prompts.
The procedures below list steps to create a Value prompt and an Attribute Element prompt that use the iPhone or iPad's geographical location. If you create a Value prompt, you will create a total of two Value prompts, one to provide latitude and one to provide longitude.
DHTML must be enabled. See Enabling DHTML in MicroStrategy Web.
From any folder page, click the Create Prompt icon on the MicroStrategy Web home page,
then click Value Prompt.
On the Definition tab, select the Numeric prompt option.
On the General tab, specify a title for the prompt in the Title field. The title is displayed along with the prompt when the prompt is run.
To require users to answer the prompt before running the report, select the Prompt answer is required check box.
To set the maximum and minimum values that can be entered by the user, select the Minimum value and Maximum value check boxes and type a value in the respective fields. You can specify a minimum value even if you do not specify a maximum value.
To specify the layout and display style of the prompt
On the Style tab, from the Display style drop-down list, select Geo Location.
To specify whether the iPhone or iPad will automatically provide its latitude or longitude to answer the prompt, select the Latitude or Longitude option. You will create a total of two Value prompts, one to specify latitude and one to specify longitude.
To save the prompt
To save the prompt, select Save As. The Save As dialog box opens. Specify a name, description, and the location in which to save the prompt and click OK.
Repeat the steps above to create a total of two prompts, one for the iPhone or iPad's longitude and one for the latitude.
You can use an Attribute Element prompt to search for elements in a list using the current location of the iPhone or iPad. Users can then select an attribute element from the filtered results.
DHTML must be enabled. See Enabling DHTML in MicroStrategy Web.
Do one of the following:
On the MicroStrategy Web home page, click Create Prompt.
From any
folder page, click the Create Prompt
icon on the menu.
The Create Prompt page opens with a list of the types of prompts you can create. Click Attribute Element List.
To determine the attribute whose elements the user is able to choose from
Click Select Attribute. Select the display attribute whose elements will be presented as answers in the prompt and click OK. Users select their filter criteria from a list of these attribute elements.
To define the specific elements the user is able to choose from
Choose one of the following options:
List all elements (no restriction): This option displays all of the attribute’s elements to the user when he is answering the prompt.
Use a predefined list of elements: Select this option to create a list of attribute elements from which users can choose. Click Add, select the elements, then click OK. To remove an object, highlight it and click Remove. To remove all items, click Clear.
Use a filter to reduce the number of elements: This option is useful for attributes with a large number of elements, such as Customer or Employee. You can select a filter that returns a specific set of customers, for example, the top 100 customers this month. Browse to and select the filter.
On the General tab, specify a title and description for the prompt in the Title and Instructions fields.
To require users to answer the prompt before running the report, specify whether the prompt requires an answer. Select the Prompt answer is required check box.
Set the minimum and maximum number of prompt answers allowed, if desired. Enter these numbers in the Minimum number of answers and Maximum number of answers fields. You can specify a minimum number even if you do not specify a maximum number.
To specify the layout and display style of the prompt
On the Style tab, from the Display style drop-down list, select Geo Location.
From the
Select location mapping level drop-down list, select the level
at which you want to return the location of the iPhone or iPad when the
user answers the prompt. For example, if you select State and the user
is located at an address in Boston, Massachusetts, the location of the
iPhone or iPad will be returned for the state of Massachusetts.
Note: The levels available are determined automatically by Google.
To select the location mapping attribute
to use to filter the element list, click Select
Attribute. Browse to and select the attribute, then click OK.
The location mapping attribute must map the location of the iPhone
or iPad as returned by Google to the data you want to filter. This location
data must be at the level selected in the Select location mapping level
drop-down list. For example, if you want to filter a list of stores by
the state in which the iPhone or iPad is located, you can select State
as the location mapping level and provide a location mapping attribute
that contains separate attribute forms for state location information
as returned by Google, and information (such as the store name and store
address) for each store.
Note: The location mapping attribute must store location information
in the same format that Google uses to provide the location of the user.
For example, if the iPhone or iPad is located in Boston, Massachusetts
and Google returns Massachusetts, the location mapping attribute must
store the state location as Massachusetts and not MA or Mass.
To save the prompt
To save the prompt, select Save As. The Save As dialog box opens. Specify a Name, Description, and the location in which to save the prompt and click OK.
Related topics