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

Bradley McLain bradley_mclain at debortoliwines.com
Mon Nov 26 21:44:55 EST 2007


I think I might work away at Brad's idea for a while, I have already had
some success with it. I have managed to load the XML into the DOM and access
it but can only so far return single entries whereas I want to be able to
return every listing for a certain tag.

Making it searchable and customizable is a whole other level lol.

Thanks for the help so far, I'll keep you updated on my progress. I think
this will require me to learn a bit of JavaScript and DOM given my knowledge
of them at the moment is very slim.

Brad

On 27/11/2007, bradleyspencer <brad at cubewerx.com.au> wrote:
>
>  Tara,
>
>
>
> Sorry about emailing direct to Brad. I did CC Openlayers Users?
>
>
>
> I use a xml file on the server. This could be generated via a database
> query and formatted into XML but I just made mine in an editor.
>
>
>
> I just use standard ajax to get the XML into the browser DOM. Once there,
> you can build your own browser-side filters and present the data anyway you
> like. In this example, I used the GoogleMaps API which is really no
> different to an OL alternative with the exception that popups/infobubbles
> are nicer in GM.
>
>
>
> http://demo.cubewerx.com.au/bi_demo.html
>
>
>
> Maybe this is of no help to you.
>
>
>
> Anyway, I am thinking of integrating GoogleMaps markers inside OL until OL
> markers and popus look better. That could be nice.
>
>
>
> Cheers,
>
>
>
> *Brad Spencer*
>
>
>
>
>
> -----Original Message-----
> *From:* Tara Athan [mailto:tara_athan at alt2is.com]
> *Sent:* Tuesday, 27 November 2007 12:33 PM
> *To:* Bradley McLain
> *Cc:* Linda Rawson; bradleyspencer; OpenLayers Users
> *Subject:* Re: [work] Re: [OpenLayers-Users] OpenLayers Read From Text
> File
>
>
>
> 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.org
>
> http://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
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071127/7f5d4499/attachment.html


More information about the Users mailing list