+1

Adding Sound to a map annotation

Lcdrgreg 8 years ago updated by icahill (Administrator) 8 years ago 8
Ian,

I have figured out how to change images etc... Now I would like to be able to play an audio clip when i click the pin... played with the tag action and cant get it to work, program shuts down on click...

It is in my android app, if you want to look at wire...

Thanks
Greg
Greg,

Can you add build permissions for me, otherwise I can't open the texteditor and view your WIRE.

Thanks,
I have done that, the audio clip is called milleraudio...

Another question: I have the annotations when clicked pop up a little paragraph that tells that locations story. I have made them zoomable but if I make the panel to large, even though hidden it covers the other pins and makes them unclickable. Is there a way around that? maybe a scale feature?

Thanks Ian, you are a world of help...
Looking at your code and not seeing an alias="UP" object? As a result I am not seeing your miller panel onselect.
the alias for the miller panel is "MILLER" (ln 34), the action to reveal is "miller" ln(67) and the onselect is on line 5. Very sorry, I know its not easy to read other peoples code and I am new to this, so I am probably not writing it in any kind of standard way.
Ian, I was able to figure out the audio, very easy, making it too hard. The part I really want to be able to do is to expand the annotations in case the tour people need them larger to read them, without hiding the pins and making them unclickable... any ideas?
Greg,

Sorry for the late response on this. Glad you figured out the audio portion.

As far as annotations go, the accessory view that displays when the pin is selected is a default size in iOS and can't be adjusted. The only thing you can do is use the onselect attribute to throw another panel up that lives outside of the annotation like you have done. Or you could play with putting a larger panel as a child inside of the annotation, you may be able to find the right amount of overlap that will look good.
Got sound to play, at the same time it brings up an image. I have added an action to make image go away and audio to stop on click, image goes away but audio does not stop...
make sure that your action is not running these at the same time, sound is very fickle, you may have to run it in a sync, otherwise it might get ignored if another action tag is happening at the same time.

I might recommend that you use a play tag to run your sound stop action.