[OpenLayers-Users] 'Markers layer' ... is this possible?

Chris Holmes cholmes at openplans.org
Tue Jun 6 18:41:02 CDT 2006



Christopher Schmidt wrote:
> On Tue, Jun 06, 2006 at 11:15:13PM +0100, nick at hogweed.org wrote:
>> What I am interested in though is retrieving the markers next time the user 
>> visits the site. Does OpenLayers have any automated way to retrieve a 
>> 'markers layer' as you scroll the map? i.e. as you scroll around, the markers 
>> on each tile are retrieved as well as the underlying map? Or do I need to 
>> implement it myself with AJAX?
> 
> The way that one of our layers (the WFS layer) does this is to load
> markers in 'tiles' -- use an XMLHttpRequest to load data from a given
> tile as you scroll. This means that you're not constantly needing to
> check whether your data is complete -- no XMLHttpRequest at the end of
> every drag, I mean, -- but that you also don't have to load the entire
> world right away.
> 
> You could do a similar thing with any format.

Note that it's pretty easy to make your data available as WFS, just 
connect MapServer or GeoServer to it, and serve it up.  Probably the 
easiest path to take.

If you're looking to modify the backend database, you could also look 
into wfs-t - you can do transactions through a standard based web 
interface.

<wfs:Transaction service="WFS" version="1.0.0">
   <wfs:Insert>
     <topp:tasmania_roads>
       <topp:the_geom>
         <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
               <gml:coordinates decimal="." cs="," ts=" ">
494475.71056415,5433016.8189323
               </gml:coordinates>
         </gml:Point>
       </topp:the_geom>
       <topp:description>this is a nice park</topp:description>
       <topp:description>title</topp:description>
     </topp:tasmania_roads>
   </wfs:Insert>
</wfs:Transaction>


I'm hoping that Openlayers will eventually support wfs-t, but if you're 
just doing points and ajax it should be pretty easy to hack that in. 
GeoServer offers WFS-T, and you can hook it up to the same PostGIS 
database (or shapefile or a few other formats) that you do MapServer - 
just have it handle the transactions.

Chris

-- 
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 269 bytes
Desc: not available
Url : http://mailman-viper.python-hosting.com/pipermail/users/attachments/20060606/dd513ab7/cholmes.vcf


More information about the Users mailing list