Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 62

gimarsa
Code is Art
Profile
Posts: 12
Reg: Sep 18, 2011
seville
120
06/12/14 10:32 AM (10 years ago)

Smug's Message Location problem

Hello, I recently bought the Smug's Message Location plugin and installed it on self Hosted BT. Its a nice and usefull plugin! I am working on an android APP and seem not to work correctly: screen loads and opens google map view. Problem is that load the default location of google maps (US MAP) but it doesn´t load current location. There is no output of any kind of error message... Have someone had the same issue?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/12/14 03:29 PM (10 years ago)
Thanks for buying my plugin! ;) Android is a little pickier than iOS... go stand outside for about 10 minutes and make sure the satellite can get a fix on your location, then try it again. If you're still having problems, I'll try and help you out, but it 'should' work out of the box, so let us know what happens. Cheers! -- Smug
 
gimarsa
Code is Art
Profile
Posts: 12
Reg: Sep 18, 2011
seville
120
like
06/13/14 09:57 AM (10 years ago)
Hi! thanks for your reply. Still not solved de issue: it seems that the device do correctly detect coordinates but not display it in the map. When i send de localization by mail, the string sent by mail is: http://maps.google.com/maps?hl=en&f=d&q=37,33145,-6,13754 the cordinates are correct but it doesn't display neither in mobile phone or in the PC the correct map. It seems the string has not the correct format or cannot be recognised! When i visit this link on a PC, google displays a general map of US and then the url automatically changes to: https://www.google.com/maps/dir///@37.0625,-95.677068,4z/data=!3m1!4b1!4m3!4m2!1m0!1m0?hl=en I hope this will help you to detect the problem. Thanks
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/13/14 10:58 AM (10 years ago)
Try using a different URL... Google has changed a couple of things that make the browser react a little different... http://maps.google.com/maps?q=37,33145,-6,13754 Drop the "hl=en&f=d&" part... and see if that makes a difference. Cheers! -- Smug
 
gimarsa
Code is Art
Profile
Posts: 12
Reg: Sep 18, 2011
seville
120
like
06/14/14 04:27 PM (10 years ago)
Hello again, making some test I figured out that the correct url format should be: http://maps.google.com/?q=37.3317116,-6.1375462 So I put in the control panel plugin set up "message data string": http://maps.google.com/?q=[deviceLatitude],[deviceLongitude] But it do not work right because the coordinate device output is with 5 decimals(right of the coma) while should be 7 decimals: the output is: http://maps.google.com/?q=37.33171,-6.13754 and it should be: http://maps.google.com/?q=37.3317116,-6.1375462 How can I change this output in the plugin code? Gimarsa
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/14/14 05:30 PM (10 years ago)
Well, You'd have to alter the code, but it won't matter. Consider this: at the sixth digit, your accuracy is plus or minus about a half a meter (1.5 feet-ish), depending on your location. So, adding a seventh or eigth digit will increase your accuracy up to about a half a millimeter, which sounds great on paper, but the accuracy of the device doesn't have that kind of tolerance. Although GPS chips are getting better and the accuracy is closer than ever before, the fact still remains that the accuracy rarely gets under 10 feet. http://cloudpointgeo.com/blog/2013/4/26/so-whats-my-accuracy-mobile-device-gps-with-ipad-iphone-android So even though your math will bring you within a hair of your location, your device won't. The best you can hope for is around 10-20 feet, depending on your location, and the number of satellites your device can see. "If" you want to do it, the answer will be in the code. But it's kind of not worth bothering with. Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/14/14 05:49 PM (10 years ago)
Well heck. Since I needed to update the plugin to reflect the new query string to accomodate google, I went ahead and extended the parameters to accept an 8 digit accuracy, although I still don't think it's going to matter, but at least the users will get the giggles. So, the plugin is updated. If you're self hosted you'll want to update the plugin in your control panel. If you're BT hosted, the change should be immediate, although I believe there were some control panel issues that were beyond my control; I'm not sure if that has been resolved. Let me know! :) Cheers! -- Smug
 

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.