How to convert MySQL WKT to GeoJSON ?

527 views
Skip to first unread message

Samy-DT

unread,
Sep 15, 2015, 6:38:27 AM9/15/15
to Leaflet
Hello,

I'm just starting with leaflet and I want to link store's locations from my MySQL database (WKT geometry of point type) to my leaflet map (GeoJSON needed).

The tutorials on the leaflet's website don't explain how to do that. I heard about "wicket" and "wellknown" to do it but it seems quite tricky for the young programmer that I am.

Does someone has an example, or can explain to me the way I can do it ?

Cheers.

Bryan McBride

unread,
Sep 15, 2015, 11:01:24 PM9/15/15
to Leaflet
I wrote a little PHP script that can query a MySQL table or view and return the results in GeoJSON format. This script relies on the excellent geoPHP library.

@titanfall

unread,
Oct 26, 2015, 8:28:54 AM10/26/15
to Leaflet
thanks man it worked fine.
is there a way to make it work using websql.

Arnie Shore

unread,
Oct 26, 2015, 11:35:24 AM10/26/15
to leafl...@googlegroups.com
Hello there.  I'm interested in any websql implementation, esp involving leaflet.  Is there anything or url you can share re what you're doing?

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages