Map Image API¶
MapImageApi
¶
Bases: HEREApi
A python interface into the HERE Map Image API
Source code in herepy/map_image_api.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
__init__(api_key=None, timeout=None)
¶
Returns a MapImageApi instance. Args: api_key (str): API key taken from HERE Developer Portal. timeout (int): Timeout limit for requests.
Source code in herepy/map_image_api.py
18 19 20 21 22 23 24 25 26 27 28 |
|
get_mapimage(top_left=None, bottom_right=None, coordinates=None, city_name=None, country_name=None, center=None, encoded_geo_coordinate=None, encoded_geo_center_coordinate=None, image_format=MapImageFormatType.png, image_height=None, show_position=False, maxhits=1, label_language='eng', second_label_language=None, house_number=None, zoom=8, map_scheme=None, uncertainty=None, nodot=None)
¶
Retrieves the map image with given parameters. Args: top_left (List[float]): List contains latitude and longitude in order for the bounding box parameter. Note: If poi or poix are given, then this parameter is ignored. Note: If this parameter is provided, it ignores tx, tx.xy, ctr, ectr. Note: If this parameter is provided then the geo search parameters are ignored, such as co. bottom_right (List[float]): List contains latitude and longitude in order for the bounding box parameter. Note: If poi or poix are given, then this parameter is ignored. Note: If this parameter is provided, it ignores tx, tx.xy, ctr, ectr. Note: If this parameter is provided then the geo search parameters are ignored, such as co. coordinates (List[float]): List contains latitude and longitude in order. city_name (Optional[str]): City name for address based search. UTF-8 encoded and URL-encoded. country_name (Optional[str]): Country name for address based search. UTF-8 encoded and URL-encoded. center (List[float]): Map center point geo coordinate. If the position is on the border of the map, the dot might be cropped. encoded_geo_coordinate (str): Encoded equivalent of position geo coordinate parameter c. Parameter c is ignored if this parameter is specified. encoded_geo_center_coordinate (str): Encoded equivalent of map center point geo coordinate parameter ctr. Parameter ctr is ignored if this parameter is present. image_format (MapImageFormatType): Image format. It is possible to request the map image. image_height (Optional[int]): Result image height in pixels, maximum 2048. Height and width parameter can be provided independently, i.e. there is no need to enter both to resize the image. show_position (bool): Flag for showing address or position information box inside the map image (if address is available or position is allowed to be shown). Note: If geo search parameters such as co are provided, then the information shown is related to those parameter's values, if valid. maxhits (int): Maximum number of search results to return. Applies only when some kind of search is performed which can return multiple results. Set to 1 to show directly the first matching result without any results listing. label_language (str): Map label language. Specifies the language to be used to display descriptions of details inside the map image. If the parameter is not provided, the default language depends on the highest prioritized locale of the client's Accept-Language HTTP header which is currently supported. If no map language based on HTTP header can be determined, the server configured default is used. Note: Some MARC three-letter language codes are supported, please check https://developer.here.com/documentation/map-image/dev_guide/topics/resource-map.html for more details. second_label_language (Optional[str]): Second language to be used, only for dual labelling, therefore a ml language must also be present Map label language. Note: Some MARC three-letter language codes are supported, please check https://developer.here.com/documentation/map-image/dev_guide/topics/resource-map.html for more details. house_number (Optional[str]): House number on the street for address based search. zoom (int): Zoom level for the map image. map_scheme (Optional[int]): Determines the map scheme to use for the map image. uncertainty (Optional[str]): The parameter u specifies position uncertainty, which is shown as a filled circle around a location defined in terms of its latitude and longitude. The value of the parameter u indicates the radius of the circle representing uncertainty. In this case, the radius is set to 5 myriameters, which is 50000 meters. nodot (Optional[bool]): If provided map image will be without dots. Returns: Map image as bytes. Raises: HEREError
Source code in herepy/map_image_api.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|