This will require Builder privileges for setup and implementation.
The Presentations Charts: Details and Gallery charts, now can be used to display images of MapQuest Maps based on data from your data set. A request to the Static Maps API returns an image. The API requires an API key in the request.
The API Key
The API requires an API key in the request. The API key allows usage monitoring by the application, but also allows MapQuest to contact the developer about their application usage. It is supplied in the request with the parameter: key=insertkeyhere
MapQuest Static Maps API
The MapQuest Static Maps API generates an image of a map based on a URL parameter through an HTTPS request. It should be noted that the URL is restricted to 2048 characters.
Map Parameters
center=New+York,NY
size=600,400@2x
size
– This parameter is required and defines the rectangular dimension of the image. It is string of the form width x height.scale
– This parameter is optional and affects the number of pixels in the resulting image. If the scale is 2, then twice as many pixels are returned than when the scale is 1 while the coverage area and level of detail remain the same. The default is 1 and the only other option is 2. The maximum allowable value for the size is 640 x 640. When a scale of 2 is specified, the returned image size is 2*w x 2* (@2x)
zoom=12
zoom
(required ) defines the zoom level or magnification level of the map. This parameter takes a numerical value corresponding to the zoom level of the region desired.
markers
– This parameter is optional and specifies one or more points that will be identified with a marker on the returned map image. The API provides very minimal styling that can be applied to the markers. The URL can contain multiple markers parameters. Each markers parameter specifies a list of locations that have the same styling. If markers are supplied then the center and zoom parameters can be omitted.
Each markers parameter is of the form:
markers=markerStyles|markerLocation1|markerLocation2|…
The available marker style descriptors are:- size – This specifies the size of the marker. The possible values are tiny, mid and small. The default is a normal size.
- color – This specifies the color of the marker. It can be a 24-bit color ( 0xFFFFCC) or a color from the set {black, brown, green, purple, yellow, blue, gray, orange, red, white}.
- label – This specifies a single uppercase alphanumeric character from the set {A-Z, 0-9}.
The following descriptors will style the associated markers with small red pins with the letter D.
-
-
-
-
size:small|color:0xFF0000|label:D
-
-
-
Creating a Details Chart
- Create a new Presentation Details Chart
- Set Frame Style to HTML
- Format as Shown in Image
- Click OK
- Then Save your Details Chart
Example URLs
URL Format
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=Boston,MA&size=200,200
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=Boston,MA&size=200,200@2x
Map Styles URL Format
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=San+Francisco,CA&zoom=14&type=map
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=San+Francisco,CA&zoom=14&type=hyb
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=San+Francisco,CA&zoom=14&type=sat
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=San+Francisco,CA&zoom=14&type=light
https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEY¢er=San+Francisco,CA&zoom=14&type=dark
HTML Template with Modification – displays satellite images instead of standard map images:
<p align="center"><img src="https://open.mapquestapi.com/staticmap/v5/map?locations=Denver,CO||Boulder,CO||39.9205,-105.0867&size=@2x&defaultMarker=marker-num&key=INSERTKEY"></p>
Coding that has worked in iDashboards v11.1e, all YOU need is your API Key!
<p align="center"><img src="https://open.mapquestapi.com/staticmap/v5/map?key=INSERTKEYHERE¢er=Boston,MA&size=200,200"></p>
Please Note: The maximum character length for http protocol is 2048 characters. If the URL goes over the limit: then no image will be created, and no map will appear in the chart.
For More Information:
- Open Static Map API
- Dashboard & Chart Design Articles
- iDashboards Builder Manual 9.13.6 Details
- iDashboards Builder Manual 8 Designing Charts
If the above is unable to resolve the issue, then please contact truOI Support for further assistance.
Comments
0 comments
Please sign in to leave a comment.