Mapquest静态地图POI不显示标签

时间:2013-08-09 09:56:52

标签: maps marker mapquest

我不熟悉地图,并在为其开发人员友好的API选择Mapquest之前尝试了Google地图和Bing地图。

我有一个Microsoft Access 2010数据库,可以创建包含许多POI的静态地图。该数据用于大都市统计区域,并指示每个区域内的城市房地产市场。每个城市由Lat / Long坐标引用。理想情况下,我需要为记录集中的每一行发送一个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|`

Example Map

1 个答案:

答案 0 :(得分: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

有关通过Static Maps API提供的poi样式的更多信息是here

希望这有帮助!