Question

I want to use mapquest in a flash builder web application (so not AIR). I've used the mapquest API documentation (here) to add a simple map in a component, but I keep getting the warning that com.mapquest.tilemap.* isn't imported, and that Tilemapcomponent can't be found. I can't find anything about this in the documentation... Do I have to add a library or component of some sort? I've also tried this using an AS3 class, but that doesn't work either and gives me the same type of errors.

This is the code in my component:

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
     xmlns:mq="com.mapquest.tilemap.*"
     layout="vertical" 
     width="100%" height="100%" 
     viewSourceURL="srcview/index.html">

    <mq:TilemapComponent id="myMap" 
                         x="0" y="0" 
                         key="myKey" 
                         zoom="3" 
                         width="100%" height="100%"/> 
</s:Group>

Let me know if you need to know something more or if you need to see more code!

Was it helpful?

Solution

Looks like you want to use the Open Flash API -- Have you downloaded the library (.swc) from this page and is it incorporated into your project? It sounds like the project isn't finding the library. If you don't want the Open version of the API, we also offer a licensed version that is based on NAVTEQ data, so that's an option too. (I work at MapQuest)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top