1

I'm trying to make an iOS app with LiveCode and the MergEXT-mapkit extension. As a starting point I am modifying the demo app that comes with the extension.

I now have an iOS app with a map which centres on my location. I've also added a POI by adding an annotation. So far so good. However, I run into a problem with the ID's of the pin's I place.

Here is how I place a POI on the map:

 put 52.158430 into tLat

 put 4.485586 into tLong

 put "Museum" into tTitle

 put "MuseumDetails" into tID

 put mergMKAddAnnotation((tLat,tLong),tTitle) into sAnnotationIDA[tID]

Now when I run the app and click the "i" next to the name of the pin, two things happen. First, the pin disappears (which shouldn't) and second, I get an ID back thats is not "MuseumDetails" (which would be the name go the card to jump to) but "1" or "2" or whatever internal ID the pin happens to have after generating the map.

I'm probably not using the ID in the right way. But how do I know what pin is pressed when I cannot predict the ID number? Any ideas?

Thanks in advance!

John.

John Allijn
  • 1,945
  • 3
  • 12
  • 9

1 Answers1

1

I think what you want to do here is:

local tID
put mergMKAddAnnotation((tLat,tLong),tTitle) into tID
put "MuseumDetails" into sAnnotationIDA[tID]

Then when you get the callback you can:

go card sAnnotationIDA[pID]
Monte Goulding
  • 2,380
  • 1
  • 21
  • 25