PDA

View Full Version : Problems for Brazil



outbacktouring
15.06.2015, 05:55
Hi
In your demo app and the app we have developed we can not place by long tap and hold for start or end pins for Brazil.
All other countries are fine.

dandronic
15.06.2015, 07:50
Hello - if you can reproduce the issue with the demo project, can you attach a modified project to this thread so that we can look into it?

outbacktouring
16.06.2015, 08:50
Hi, not possible at this stage to post our project. In your demo app, no start or end find can be placed for Brazil in Simulation mode and in Real, no end pin can be placed.

dandronic
16.06.2015, 11:13
If you can reproduce this problem in the demo project - can you edit the code and post the modified demo project?

outbacktouring
17.06.2015, 03:42
There is no need for me to post any edited code. It does not work in the demo project downloaded...

1. Click to open Project folder.
2. Click to open*SKMaps
3. Click to open*SKMapsFrameworkDemo
4. Open “FrameworkIOSDemo.xcodeproj” using xCode
5. Select your preferable simulator for this project
6. Run the project
7. Select “Car Navigation UI “ or “Pedesrian Navigation UI” under Routing and Navigation
8. Long tap on map it will place a red pin on map.
9. Change the menu button on left side from Select End Point to Select Start Point, now again Long tap on map, it will place a green pin in map.
10. Now scroll map to Brazil, repeat steps 8 and 9, it will not place Red or Green Pin in Brazil but in other countries it will place pins.

outbacktouring
19.06.2015, 05:38
Project is here
https://www.dropbox.com/s/0x1g8k4o0y6sar3/Project.zip?dl=0

Adela_Silvia
19.06.2015, 08:42
Thank you outbacktouring, We will investigate it and we'll get back to you with an answer as soon as we can.

outbacktouring
19.06.2015, 09:38
Thanks. It is an odd bug and only seems to be for Brazil, although I do note that the Forever app and other apps by squabbler in the app store do handle Brazil OK.

dandronic
19.06.2015, 16:23
Hello,
Indeed this is a bug in the demo project - inside SKTNavigationUtils.m, in the locationIsZero function:



+ (BOOL)locationIsZero:(CLLocationCoordinate2D)locat ion {
return (location.latitude < 0.000001 && location.longitude < 0.000001);
}

The above code will fail when both latitude and longitude have negative values (the case for Brasil or any other country in South America).

The code has to be change do something like


+ (BOOL)locationIsZero:(CLLocationCoordinate2D)locat ion {
return (fabs(location.latitude) < 0.000001 && fabs(location.longitude < 0.000001));
}

We will fix this in the next release - please make the change yourself in the demo project for the time being

outbacktouring
20.06.2015, 03:07
Thanks, great work and support.