[OpenLayers-Users] [work] Re: OpenLayers Read From Text File

Bradley McLain bradley_mclain at debortoliwines.com
Tue Nov 27 20:14:14 EST 2007


After some brief mucking about with loading XML into the DOM etc, I have
decided that given the amount of data that will need to be loaded will be
enormous. Gunna go with the shadow database idea instead.

Have found an interesting plugin for typo3 which uses Google maps to locate
stores based on data you have stored in its MYSQL database. Gunna have a
play with it and see what possibilities it holds.

Looks like this may solve my problem, I'll keep you updated on the progress.

Cheers

Brad

On 27/11/2007, Tara Athan <tara_athan at alt2is.com > wrote:
>
>  There seems to be a missing message in this thread from Bradley Spencer,
> perhaps sent directly to Bradley McLain, rather than the mailing list?  I
> would be interested in his solution.
> ******
> I have recently constructed such an implementation- it may be instructive
> for you to hear what we have done.
> The demo map appears at
> http://alt2is.com/hcvMaps/latin1/html/hcvoppsmap_utf8.html
> In this particular case, php is used to create the marker text file from a
> database query.
> {You can't see the php from the link above, of course but I am happy to
> share code snippets if some one is interested.}
> This presents the same information for all users.  The next step in our
> implementation is to bring in the query capability.
> Presently our map shows the number of all volunteer opportunities in each
> country. We would like to allow the user to instead show that number of
> opportunities that match their specifications- specialty field, duration
> etc.- and have the link lead to a list of only these matches.
>     This requires a database query when the user requests the map. Our
> plan is to use a php file to query the database (also a
> shadow database as you are considering, containing only information
> relevant for the map, and synchronized with the main database regularly
> using cron and a php script).
>   If a text layer is used, then each user will be creating a unique text
> file on the server, which is given some unique name  that is passed to the
> html file by php. Some mechanism must be created to delete these files when
> the user is done with them.
> An alternative is to write marker information directly to the html file.
> This has different options for the markers, including
> > Markers with no pop-up, see
> http://openlayers.org/dev/examples/markers.html
> >Anchored bubbles, which offer the possibility of  changing the style of
> the popup, which is not possible with the text layer:  see http://dev.openlayers.org/docs/files/OpenLayers/Popup/AnchoredBubble-js.html
>
> and http://openlayers.org/dev/examples/popups.html
> However, based on the problems I see in this example, perhaps anchored
> bubbles are not stable yet, or the example code has bugs...
> I am debating which way to go and am interested in the experience of
> others- Thanks
> Tara
> Bradley McLain wrote:
>
> @ Linda I have been told that it would be preferable not to directly
> access the information, they would prefer that the information is dumped
> nightly to something else (text file or another database) and then accessed
> that way. I thought that a text file would be the easier option, given the
> smaller size and ease of maintenance.
>
> @Brad, this sounds like the kinda of thing that I want to do. Doing it
> this way will I be able to build some sort of interface that allows users to
> search and display the markers that they want?
>
> Cheers
>
> Brad
>
>
> On 27/11/2007, Linda Rawson <linda.rawson at gmail.com > wrote:
> >
> > Why don't you just create a database view of the information and make it
> > available via a web service and your users would always have up to date
> > information.
> >
> > Linda
> >
> >   On Nov 26, 2007 3:12 PM, Julien-Samuel Lacroix <jlacroix at mapgears.com>
> > wrote:
> >
> > > Hi,
> > >
> > > You have a great resource of examples here:
> > > http://www.openlayers.org/dev/examples/
> > >
> > > Check the markersTextLayer.html example to have an example of a layer
> > > that comes from a csv file.
> > > ( http://www.openlayers.org/dev/examples/markersTextLayer.html)
> > >
> > > There's also use gml (see the gml-layer.html) if you prefer xml files.
> > >
> > > Julien
> > >
> > >
> > > Bradley McLain wrote:
> > > > Ok what I am trying to do is to have a progress database dump all
> > > > relevant information about various locations in some form of text
> > > file
> > > > nightly.
> > > >
> > > > I then want to use OpenLayers to read from/query this file and
> > > display
> > > > the relevant information.
> > > >
> > > > I was wondering if this is possible to do, can OpenLayers read/query
> > > a
> > > > text file such as a csv or xml?
> > > >
> > > > Cheers
> > > >
> > > > Brad
> > > >
> > > >
> > >  >
> > > ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > Users mailing list
> > > > Users at openlayers.org
> > > > http://openlayers.org/mailman/listinfo/users
> > >
> > > --
> > > Julien-Samuel Lacroix
> > > Mapgears
> > > http://www.mapgears.com/
> > > _______________________________________________
> > > Users mailing list
> > > Users at openlayers.org
> > > http://openlayers.org/mailman/listinfo/users
> > >
> >
> >
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.orghttp://openlayers.org/mailman/listinfo/users
>
> ------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.16.7/1151 - Release Date: 11/25/2007 4:24 PM
>
>
>
> Tara Athan
>
> Principal, Alternatives to Invasive Species
> tara_athan at alt2is.com
> 707-485-1198
> PO Box 415
> Redwood Valley, CA 95470
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071128/c92f6f3d/attachment.html


More information about the Users mailing list