Not Understanding Whats Happening With 2 Maps 1 Page on iOS


This is strange to me.

On page load i create two location objects from lats and longs on iOS.

I set the locations to display on 2 maps on the page and they display fine…

Also on page load, I set 2 CCLocation page variables up with the Departure and Arrival locations so that I can call them later and open an Apple map for directions to each of the airport locations saved.

On map 1 (departures) I long press and it opens up directions to map 2 (arrivals) even though its not calling from the arrival page variable.

To test, i then remove the arrivals map Page Variable, as well as the actions that save that page variable CCLocation on page load, and it works fine.

I.e. when you long press departure airport map, it opens up Apple maps and takes you there just fine.

I re add arrival cc location page variable and connect arrival map 2 to it to direct and map 1 takes me to map 2’s location again?!

Is there something im missing here?

2 independent variables with independent data.

Maps display independent locations just fine.

When i click map 1 it directs to map 2 location for some reason despite there being no relationship or connection to map 2 (arrivals) airport cclocation page variable.


I’m not exactly following all this (but massive efforts for trying to articulate it)… Having 2 maps on 1 page isn’t advisable. We’ve have many cases of erratic and random things occurring in this situation. The code isn’t setup in a way to properly work 2 maps on the same page so I can believe that strange things are occurring here. You might want to adjust the design to facilitate the use of 1 map per page.