[OpenLayers-Users] Creating Vector layer from MySql database

Smaran Harihar smaran.harihar at gmail.com
Fri May 4 18:07:18 EDT 2012


Hi Mike,

Thanks for the reply. Presently I am only using OpenLayers and python
for extracting info from rasters.

Now I have a new task in which the data is present in MySql database.
So i need to extract the info and create a Vector Layer (basically
points or polygons(bounding box)).

So should I create the layer first or should I create it on the fly?
And also how?


-- 
Thanks & Regards
Smaran Harihar


On Fri, May 4, 2012 at 12:03 PM, Michael Ryan <mr at mry4n.net> wrote:
> Hi Smaran,
>
> If you're using something like PHP, you can dump the results either
> visibly or invisibly on your page, and then scoop up those results
> with javascript.
>
> Or, if you want to be really cool (and possibly go a little crazy),
> you can try using OpenLayers.Request.POST and JSON, which will still
> require something like PHP to query the database.
>
> Check out the TileStitching example for using the second method.
>
> -Mike


More information about the Users mailing list