Adding movieclips to the map
Is it possible to add a movieclip inside the map so that it will scale and pan together with the map?
Thank you!
Thank you!
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Yes. You can make an instance of your MovieClip and add it to your map using putMarker. You should then listen for start/stop zoom and extent changed MapEvents and scale your MovieClip according to the zoom level. The map will handle positioning the clip - the registration point will be fixed at the given Location.
To scale your movie clip, first keep track of the zoom level at scaleX/Y=1 (let's call it clipZoom). Then when the zoom level goes up, set scaleX and scaleY of your clip to be Math.pow(map.getZoom() - clipZoom). If you're using TweenMap and you want in-between scales to be correct, use map.grid.zoomLevel instead of map.getZoom().
Hope that helps!
1 person says
this answers the question
Loading Profile...



EMPLOYEE