Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 6 replies, 3 voices, and was last updated 7 years, 7 months ago by
Steven Zahm.
-
AuthorPosts
-
02/09/2016 at 2:35 pm #364207
Steven Gardner
GuestHi there,
I am using Connections to map mooring locations around and until the upgrade I just did, my map markers were based on Lat/Long coords
Now it appears that the address is now overriding this and any new map makers always take the address location
Is there any way to plot the Lat/Long regardless of address?
Cheers
Steven
02/10/2016 at 12:19 pm #364514Steven Zahm
Keymaster@ Steven
Hmmm… this functionality has not changed. The lat/lng will have priority over the address when rendering the map. I just tested again to make sure something didn’t break. I added an entry with a very broken/invalid address and then added lat/lng to a known location and the map pin was rendered at the correct location. So it seems like it is working just like you want. Can you give me a step by step example so I can try to replicate the issue?
02/17/2016 at 5:04 am #365555Steven Gardner
GuestHi there,
sorry for the delay in my reply, I’ll see if I can document the process and send to you. Shall I submit it here, or can I send screenshots to you?
Cheers
Steven
02/17/2016 at 10:34 am #365602Steven Zahm
Keymaster@ Steven
If you login to the forum, you’ll be able to post screens. The login will be the same as the one you created when checking out. Alternatively, you can share screens using a web service such as ScreenCloud or Screencast.
02/17/2016 at 7:06 pm #365725steven1137
ParticipantHi there, Upon testing with my client it looks like the entry form is amending the lat/long figures I have attached before and after screenshots of the lat/long coordinates, it appears to be rounding them up?
Cheers
Attachments:
You must be logged in to view attached files.02/18/2016 at 11:41 am #365779Steven Zahm
Keymaster@ Steven
Thanks for the screenshots. It does appear to rounding them up. I’ll dig into that and fix it for the next update. Now that said… is it really important for that level of precision? Assuming the online calculators I found for distance between two points, the difference is only 1.6972441 inches.
02/18/2016 at 12:18 pm #365782Steven Zahm
Keymaster@ Steven
I spent a couple hours tracking this down… here’s what I found. It is a little technical…
When I save the data using the core WordPress wpdb object, which one should do when writing to the database, I was specifying the lat/lng as a float number and when WordPress sanitizes the float number, making it safe to write to the database, the default precision for a float of 14 is used which basically “caps” the decimal place to 6 digits. It is actually a bit more complicated than that and I would have to delve deeper myself to better understand myself. But the jist is floating point numbers are approximate representations of real numbers and they are not exact. Suffice to say, I did not know this.
That said, there’s actually no way to change that precision when telling WordPress to sanitize a float. So the only solution is to tell WordPress it is a string and let the database deal with the conversion. Since the table that stores the the lat/lng are setup as decimal (a real number :) ) with a precision of 15 and a scale of 12, the lat/lng will not get rounded until the 12th decimal place.
Anyway, I made the change which will be included in the next update. Aplogies for the trouble.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.