Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 32

Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
01/25/14 12:14 PM (11 years ago)

BT_screen_map.java Longitude error for directions.

Found this error in the code for the BT_screen_map.java. Needs to be fixed in the plugin. I fixed on my app, working great now. ... //showDirections... public void showDirections(int markerIndex){ //get info for tapped location... BT_item tappedItem = childItems.get(markerIndex); String locationLatitude = BT_strings.getJsonPropertyValue(tappedItem.getJsonObject(), "latitude", ""); String locationLongitude = BT_strings.getJsonPropertyValue(tappedItem.getJsonObject(), "longitude", ""); //we must have a device location... String tmpLatitude = District22_appDelegate.rootApp.getRootDevice().getDeviceLatitude(); String tmpLongitude = District22_appDelegate.rootApp.getRootDevice().getDeviceLongitude(); //if we don't have a device location saved, see if we have the map's "user location" available... if(tmpLatitude.length() < 3){ if(mapView.isMyLocationEnabled()){ Location deviceLoc = mapView.getMyLocation(); tmpLatitude = String.valueOf(deviceLoc.getLatitude()); tmpLongitude = String.valueOf(deviceLoc.getLatitude()); <<---------------- Should be "getLongitude" } } ....
 
Sherry
Lost but trying
Profile
Posts: 137
Reg: Jan 05, 2013
South Africa
11,670
like
01/27/14 07:02 AM (11 years ago)
Thanks so much for posting this it fixed my map :) I was just about to search the forum to find an answer to this very problem when I saw your post because previously every time I clicked on driving instructions it put my current location as somewhere in the ocean. LOL
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/17/14 04:16 AM (11 years ago)
I asked ... It is now fixed! :-) https://www.buzztouch.com/plugins/plugin.php?pid=9E669EFC6F081CA47A33877 Download the updated version if you want the latest edition: https://www.buzztouch.com/plugins/download.php?pid=9E669EFC6F081CA47A33877 -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.