ARe your pages positions on the timeline? If so, you could insert a trigger at the relevant points to load the google map. Another way to do it would be to have each of your pages as a library symbol and include the code to load the google map in the symbols' creation complete events.
hope this helps
Hi that is awesome, yes they are all on the timeline, would i tell it to append the symbol within a trigger? Could you possibly give me some example code doesn't have to be intense haha just want to make sure i implement it properly!
do i just add this to the trigger on the timeline?
sym.$("weatherframe").append('<iframe src="https://www.google.com/maps/embed?pb=er!1m14!1m8!1m3!1d3310.9268577049047!2d18.38818599999 9997!3d-33.917282!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x1dcc6723bb03e699%3A0x66bd79af29f1a6c b!2sProtea+Hotel+Sea+Point!5e0!3m2!1sen!2s!4v1404179833259" width="1080" height="1235" frameborder="0" style="bord:0"></iframe>');
Hi there,the I added code above to my project and yes when i browse to the page now the map it reloads AWESOME except now when i go back to my homepage andthen to the map page again it draws a second map directly below it? do i have to clear the canvas maybe?
Yes, I think that would work. If you want to go down the symbol route, you would store the container for the map in your library as for example "mapContainer". While you're inside the symbol, you need to give it a creation complete event (annoyingly, they don't have one by default). To make one, make sure your main stage has a creation complete event ( if not just make one that you can delete later). Then click on the stage itself at the left of your code window and copy it's creation complete function; click on your symbol and paste in. Now your symbol will have a creation complete tab. Paste your google maps code as above into this.
TO bring your symbol to the stage use,
var mapPage = sym.createChildSymbol("mapContainer", "Stage");
Hi Tim thanks for the replies,
I am having a bender here is there a command like "clear" "refresh" "unload" or something of the sort which can clear the symbol on a click and leave it ready to load again once the event is triggered on the timeline, a function like .remove totally removes the symbol and cant be called again, is there any way to do this easily delete the symbol on click and load/reload the symbol on trigger event..
Thanks in advance!
I just found it!! If someone else is reading this and is interested .empty is the magic word, to clear a symbol without deleting it entirely yay! I LOVE Edge
So this fires on the trigger.
sym.$("googlemap").append('<iframe src="https://www.google.com/maps/embed?pb=!1m!4v1404179833259" width="1080" height="1235" frameborder="0" style="border:0"></iframe>');
and then on the back button to home i have this (its Awesome!)
Great - glad you got it working, and thanks for posting about the empty function.