View Full Version : Problems for Brazil

15.06.2015, 05:55
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.

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?

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.

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?

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.

19.06.2015, 05:38
Project is here

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.

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.

19.06.2015, 16:23
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

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