0

我是地图新手,在选择 Mapquest 作为其对开发人员友好的 API 之前尝试过 Google 地图和 Bing 地图。

我有一个 Microsoft Access 2010 数据库,它创建了一个包含许多 POI 的静态地图。该数据适用于大都会统计区,并显示每个区域内的城市房地产市场。每个城市都由纬度/经度坐标引用。理想情况下,我需要为记录集中的每一行发送一个 URL,POI 按顺序编号(1-150+),并在单击或鼠标悬停时启用信息框来弹出 POI 标记。信息框包含该 POI 的市场数据。

尽管通过 API 文档工作了几天,但我无法显示超过第一个标签(“1”)或指定颜色的内容。是否有我缺少的参数?我的代码如下,截图如下。

http://www.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd%7Cluub20ual1%2C8g%3Do5-9ur216&size=770,770&zoom=2&type=hyb&imagetype=jpeg&pois=green-1,34.12,-118.76|pois=green-2,34.2,-118.13|pois=green-3,34.17,-117.87|pois=green-4,34.09,-117.96|pois=green-5,33.97,-118.15|pois=green-6,34.11,-118.67|pois=green-7,34.19,-118.6|pois=green-8,34.43,-118.46|pois=red-9,34.51,-118.68|pois=green-10,33.86,-118.05|pois=green-11,34.09,-117.9|pois=green-12,33.99,-118.39|pois=green-13,33.99,-117.81|pois=red-14,34.14,-117.96|pois=green-15,34.08,-118.03|pois=green-16,33.91,-118.4|pois=green-17,33.89,-118.29|pois=green-18,34.29,-118.5|pois=green-19,34,-117.97|pois=red-20,33.79,-118.29|pois=green-21,33.83,-118.07|pois=red-22,33.86,-118.39|pois=green-23,33.97,-118.21|pois=red-24,33.95,-118.36|pois=red-25,34.23,-118.14|pois=green-26,34.23,-118.24|pois=green-27,33.89,-118|pois=green-28,34.02,-117.93|pois=green-29,34.15,-117.76|pois=red-30,34.69,-118.52|pois=green-31,34.48,-117.92|pois=red-32,33.79,-118.31|pois=green-33,33.97,-118.24|pois=green-34,33.92,-118.2|pois=red-35,34.03,-118.7|pois=green-36,33.88,-118.4|pois=green-37,33.97,-118.43|pois=green-38,34.27,-118.45|pois=green-39,34.05,-118.14|pois=green-40,34.23,-118.47|pois=green-41,34.16,-118.37|pois=green-42,34.24,-118.55|pois=green-43,34.07,-118.54|pois=green-44,34.25,-118.41|pois=green-45,34.22,-118.44|pois=green-46,33.89,-118.16|pois=green-47,34.48,-117.88|pois=green-48,33.98,-118.08|pois=green-49,33.94,-118.44|pois=green-50,33.75,-118.31|pois=green-51,33.83,-118.38|pois=green-52,34.2,-118.54|pois=green-53,34.06,-118.08|pois=green-54,33.97,-117.9|pois=green-55,34.1,-117.81|pois=green-56,34.28,-118.44|pois=green-57,34.11,-118.08|pois=green-58,34.12,-118.11|pois=green-59,33.73,-118.29|pois=green-60,34.43,-118.51|pois=green-61,33.92,-118.06|pois=green-62,34.01,-118.49|pois=green-63,34.14,-118.46|pois=green-64,34.2,-118.05|pois=red-65,34.04,-118.04|pois=green-66,33.94,-118.2|`

示例地图

4

1 回答 1

0

免责声明:我在 MapQuest 工作。

看起来您正在向调用添加额外参数,这可能导致服务忽略您分配给每个 poi 的编号。此外,我们不提供与您在地图上放置的绿色图标样式相同的红色图标。这是您使用橙色 pois 而不是红色的请求示例,因为我们提供该样式的蓝色、橙色、绿色、紫色、白色和黄色:

http://www.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd%7Cluub20ual1%2C8g%3Do5-9ur216&size=770,770&zoom=2&type=hyb&imagetype=jpeg&pois=green-1,34.12,-118.76|green-2,34.2,-118.13|green-3,34.17,-117.87|green-4,34.09,-117.96|green-5,33.97,-118.15|green-6,34.11,-118.67|green-7,34.19,-118.6|green-8,34.43,-118.46|yellow-9,34.51,-118.68|green-10,33.86,-118.05|green-11,34.09,-117.9|green-12,33.99,-118.39|green-13,33.99,-117.81|yellow-14,34.14,-117.96|green-15,34.08,-118.03|green-16,33.91,-118.4|green-17,33.89,-118.29|green-18,34.29,-118.5|green-19,34,-117.97|yellow-20,33.79,-118.29|green-21,33.83,-118.07|yellow-22,33.86,-118.39|green-23,33.97,-118.21|yellow-24,33.95,-118.36|yellow-25,34.23,-118.14|green-26,34.23,-118.24|green-27,33.89,-118|green-28,34.02,-117.93|green-29,34.15,-117.76|yellow-30,34.69,-118.52|green-31,34.48,-117.92|yellow-32,33.79,-118.31|green-33,33.97,-118.24|green-34,33.92,-118.2|yellow-35,34.03,-118.7|green-36,33.88,-118.4|green-37,33.97,-118.43|green-38,34.27,-118.45|green-39,34.05,-118.14|green-40,34.23,-118.47|green-41,34.16,-118.37|green-42,34.24,-118.55|green-43,34.07,-118.54|green-44,34.25,-118.41|green-45,34.22,-118.44|green-46,33.89,-118.16|green-47,34.48,-117.88|green-48,33.98,-118.08|green-49,33.94,-118.44|green-50,33.75,-118.31|green-51,33.83,-118.38|green-52,34.2,-118.54|green-53,34.06,-118.08|green-54,33.97,-117.9|green-55,34.1,-117.81|green-56,34.28,-118.44|green-57,34.11,-118.08|green-58,34.12,-118.11|green-59,33.73,-118.29|green-60,34.43,-118.51|green-61,33.92,-118.06|green-62,34.01,-118.49|green-63,34.14,-118.46|green-64,34.2,-118.05|yellow-65,34.04,-118.04|green-66,33.94,-118.2

有关通过静态地图 API 提供的 pois 样式的更多信息,请参见此处

希望这可以帮助!

于 2013-08-09T21:24:02.090 回答