Upgrade from 5.3 to 6.0 (the finally to the saga)
So I finally have our Map Application back up and functioning as it should be with the new version of MapQuest API 6.0. This upgrade has been a good learning experience to find some places in my code that were a little behind, and well needed some attention. We also got to refactor some of our XML that we store and drop the size of our DB a little too with this upgrade.
The last of the findings:
- Polygon Overlays are fun but watch for two things:
- Copy does not make a true copy. It is giving by reference the Drawing of the polygon of the map to the new Polygon you are making. This will cause greif and utter frustration that took me about 3 days to figure out. The Fix: Create a new polygon overlay and just get the shapepoints from the old one and let the Polygon overlay draw you a new polygon.
- setVisible = visible. So the old setVisible function looks like it might get depricated and go to visible. They both do the same thing just pay attention if your visibility issues start popping up one upgrade.
- DisplayObjectOverlays.displayObject: When you create a display object overlay and add content to it, you will need to call do.addChild() with the content you just assigned. What happens? You will not see your object on the screen. If you add the child your object will appear.
- There seems to be an issue with loading tiles with the new version of Adobe Flash Player 10.1. This really is not a problem with the new API but it is an issue with the player itself and happens with 5.3.2 as well. There is a fix out there for that too that can help. The MQ guys say you can just pan 0 % to make sure that it doesn’t happen to you. What I saw were grey and white tiles left of the map when I used the zoom wheel, panned the map or changed the map type. So I wrote a fun function called adobeBugShift() to help out with that. Here is what I am using, I just extended the map and added it in as a function:
public function adobeBugShift():void
{
this.panSouthWest(0);
}
The people at MQ know about the issues and I am sure they will be on them soon. I don’t have a timeline for them, but I bet they make it in the next couple of releases that come out.
What excites me? When things just work better and faster. Here are some of the things that seem to have changed.
- Polygons produce faster, we throw hundreds or thosands of these things out there and it works very well, seems a bit faster.
- Declutter has some animation and is faster. Oh and I didn’t even have to change much there.
- Thanks to the new Flash player and better code from MQ the footprint is way smaller. Did flash player even do GC before because wow!?
Have you upgraded from 5.3 to 6.0? Do you want to? Honestly it was not too bad, just took some time to work out the few bugs that we had because I have honestly 100 custom classes that utilize their classes and well it only really took me a week to do. I had a lot of other projects in the fire as well. With these tips and updates you guys should be able to do it much faster if you were doing some similar things.
About this entry
You’re currently reading “Upgrade from 5.3 to 6.0 (the finally to the saga),” an entry on MapQuest Actionscript 3.0 Learning and Blogging
- Published:
- September 14, 2010 / 6:19 pm
- Category:
- mapquest 6.0, polygons
- Tags:

No comments yet
Jump to comment form | comment rss [?] | trackback uri [?]