Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Map marker - any way to eliminate the drop and bounce animation?
Started by gsumwork May 03 2014 08:28 AM

4 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gsumwork

[GLOBAL: userInfoPane.html]
gsumwork
  • Enthusiast

  • 47 posts
  • Corona SDK

When using addMarker, is there anyway to eliminate the drop and bounce animation of the marker itself? The desired behavior is to just appear on the map.

 

Thanks



[TOPIC: post.html]
#2

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

Try supplying a custom marker image. In that case they just appear with no animation.



[TOPIC: post.html]
#3

gsumwork

[GLOBAL: userInfoPane.html]
gsumwork
  • Enthusiast

  • 47 posts
  • Corona SDK

Thanks for the reply ksan. I am actually using a custom marker image. A png file and still getting the animation.



[TOPIC: post.html]
#4

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

No worries. Which platform? I was looking at IOS and it looks like there is almost no animation with custom icon. 



[TOPIC: post.html]
#5

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

Ok. I think the custom image animation persistance is an Android only phenomenon and there is probably on way around it as Corona SDK simply makes use of the underlying OS component (I might be wrong on this one of course).

 

However, I think I found a workaround. The map gets created, loaded and then the markers go on it with the animation. I find that if you create the map but immediately move it out of sight like so : 

myMap.alpha = 0
myMap.x, myMap.y = -1000, -1000 

and perhaps put a "Please Wait" sort of screen filler, you get the map loaded and animations done with in the background. 

 

You can then bring the map back in sight and the markers will be in place with no animation. It is a crude workaround at best but it might be still better than the animated markers if you really hate them. 




[topic_controls]
[/topic_controls]