[OpenLayers-Users] Displaying Multiple Markers from Database

Josh Livni mailing_lists at umbrellaconsulting.com
Sat Feb 16 16:31:44 EST 2008


I believe that FeatureServer can use MySQL as a backend, in which case 
you would:
  - need to be able to run python cgi scripts on your server
  - do a quick setup of FeatureServer
  - request a url that gets you the markers in geojson or wfs
  - look at one of the various openlayers examples, such as wfs.html 
and/or the featureserver.org demo

  -Josh

Eric Lemoine wrote:
> On Feb 16, 2008 8:16 AM, schone <prashant.g.raju at gmail.com> wrote:
>   
>> Hello all,
>>
>> New to OpenLayers but I think it is an amazing project!
>>
>> So here is my situation...
>>
>> I have around 200 long/lat in a database attached with unique locations.
>> (MySQL database)
>>
>> I would like to display all these markers on the map using OpenLayers but
>> I'm finding it hard to display multiple markers.
>>
>> Has anyone got any good examples of working with Multiple Markers and MySQL
>> or an XML document?
>>
>> Thanks for the help!
>>
>> Kind Regards
>> Prashant
>>     
>
> Hi Prashant
>
> You'd need to have some software on the server side to extract the
> data from your database and send it to the client. If I had to do
> that, I'd implement a simple web sevice in Python that reads the
> lon/lat's from the database and sends a JSON representation of this
> data to the client. On the client side, I'd write code that requests
> the data through Ajax and uses OpenLayers to create and display a
> marker for each lon/lat in the response. This is just off the top of
> my head...
>
> Cheers,
> --
> Eric
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   



More information about the Users mailing list