Jump to content
bernhard

GeoWire - open source web mapping application

Recommended Posts

hi guys,

i'm happy to show you my first project realised with processwire and to say hi the first time here in the forum, although i have been reading, following, learning and liking around here for some weeks now  :) the reason why i did not post any questions is quite simple: all answers for my questions have already been posted (and answered) in the forum/wiki/docs - really great!

let me also say thanks to gebeer, who forced me to take a second look to processwire (coming from joomla/seblod :-X  and thinking processwire is not worth the effort of changing from a well known system - i was so wrong ^^)  ^-^

So what is "GeoWire"? (http://www.geowire.org)

GeoWire is a web mapping tool for creating and sharing web-maps. It's a bit similar to google maps, but you can put your own maps (also all the google layers) and overlays into it and create your own functionality with javascript. First it was a "static" HTML/JS project but within the weeks of development gebeer told me about processwire. So in the end i had my HTML/JS web map viewer ready and thought how great it would be to manage all the code snippets directly on the server with processwire as GUI - you could easily copy your map collocations, drag and drop layers in the layer tree, drag&drop buttons in the toolbar and so on...

2 days later i had the first working prototype ready!!! PW is just wonderful, thank you Ryan+Team!

Today i - finally - finished the video tutorials for GeoWire which i published as an open source web mapping tool. Oh man, that sounds so arrogant for me - i'm not a professional developer and i know it is far from perfect, but at least i wanted to give it a try :rolleyes:  . I would have also put it to GitHub, but i have no experience with it till now and so it was too complicated for me. I hope I am not violating PW by providing GeoWire for download on my website geowire.org? I don't even know if anybody is interested in geowire at all, but maybe it can at least serve as starting point for any other similar projects... any feedback is appreciated.

Here is the demo: http://www.geowire.org/demo

Maybe you're interested in the videos:

 
 
How it works in short by an example:
 
The mapPanelToolbar makes this
post-2137-0-07650500-1407444766_thumb.pn
 
out of that
post-2137-0-89619700-1407444767_thumb.pn
 
using that code snippet,
/* ########################################
######## mapPanelToolbar.js
######################################## */

    Ext.onReady(function() {

        mapPanelToolbar = Ext.create('Ext.toolbar.Toolbar', {
            dock: 'top',
            items: [<?php foreach($page->children as $child) {
                if($child->include_file) {
                    include('GeoWire/include/'.$child->include_file);
                    echo ',';
                }
                echo $child->include_direct.',';
            } ?>]
        });

    });

 that is recursively loaded by the processwire template

	// create javascript app file from all included code snippets
	ob_start("makefile");
		// include all children of current page
		foreach ($page->children as $child) {
			include_file($child);
		}
	ob_end_flush();
	function makefile($buffer) {
		if(!wire('config')->dev) {
			include('GeoWire/JSMin.php');
			$buffer = JSMin::minify($buffer);
		}

		// take first map if it is homepage
		$pageid = (wire('page')->id == 1) ? wire('page')->child->id : wire('page')->id;

		file_put_contents("GeoWire/app".$pageid.".js", $buffer);
	}

happy processwiring and good night :)

Edit: Do you think something like this would be possible or even better put into a module? I know my first version of geowire will soon be outdated as it uses PW2.4 as core, but for the time it was the best way to go and to be honest, i don't know when/if i have the time/motivation to develop this project in future...

  • Like 21

Share this post


Link to post
Share on other sites

Great first post and webapp zwergo! Welcome to the forums and to PW...There's a number of ex-Jomlaarers here in the forums

Is there a missing 'not' here btw? :-) or did you really mean to say your found PW has a steep learning curve? :-)

It's really easy to learn if you are familiar with PHP and you'll have a really steep learning curve!

Share this post


Link to post
Share on other sites

Btw, you links to the demo videos here lead to 404s...the ones on your site work just fine...

  • Like 1

Share this post


Link to post
Share on other sites

@zwergo, I took the freedom to correct the links in your post, the "watch?v=" part was missing. Hope you don't mind.

  • Like 2

Share this post


Link to post
Share on other sites

Awesome first post. Great job!

Share this post


Link to post
Share on other sites

Yes, great entrance and project. Was a pleasure to watch your youtube clips

with good sound (mic) quality.

Share this post


Link to post
Share on other sites

This looks awesome. Been playing with the demo for a while and, though I clearly don't yet understand much of what it's capable of, so far I'm very impressed. Seems like a very good example of building (relatively) large-scale application on top of ProcessWire :)

You were wondering if this would make sense as a module. What I've seen so far makes me think that it probably wouldn't make that much sense.

You could move individual features, functions etc. to modules in order to separate some of the business logic and perhaps even parts of markup generation from actual views (template files), but your current structure seems to fit this project pretty well too, so it's entirely up to you. Of course this sort of separation could be achieved simply by moving functions to include files, so a module isn't needed for that either.

One quirk in the demo map is that whatever I type in the search field (left toolbar), "Fehler: Zeitüberschreitung der Anfrage in functions.js" is displayed. Perhaps something isn't working quite right there?

Is there a missing 'not' here btw? :-) or did you really mean to say your found PW has a steep learning curve? :-)

Sorry, "a bit" off-topic, but this depends on which meaning of "steep learning curve" is used. I'll never be able to wrap my head around steep learning curve meaning that something is difficult to learn -- that's just plain wrong. Learning vs. time make so much more sense ;)

  • Like 4

Share this post


Link to post
Share on other sites

Sorry, "a bit" off-topic, but this depends on which meaning of "steep learning curve" is used. I'll never be able to wrap my head around steep learning curve meaning that something is difficult to learn -- that's just plain wrong. Learning vs. time make so much more sense ;)

Wise words from a wise man; Thx T :-)

  • Like 3

Share this post


Link to post
Share on other sites

thank you all for your feedback! thank you teppo for clarifying the learning curve  :)

pwired, that's quite funny because i had to record the sound with my mobile phone and then put it all together afterwards because i'm on vacation in the mountains and nobody here had a headset to borrow  :lol: that's why i also had to cut down quality of the videos... internet here is even slower than me talking english ^^

One quirk in the demo map is that whatever I type in the search field (left toolbar), "Fehler: Zeitüberschreitung der Anfrage in functions.js" is displayed. Perhaps something isn't working quite right there?

teppo, you're right! for some reason (can't remember why exactly right now) i had to put 3 files in the root directory of processwire: download.php, ortssuche.php and proxy.php and i forgot to put them in the geowire zip file (and the demo). now at least this part works fine and throws an ajax-request to google geocoding service. when you click on the result, it sets the marker to this location and centers the map.

Been playing with the demo for a while and, though I clearly don't yet understand much of what it's capable of, so far I'm very impressed.

hehe. thank you.

the intention was to build something similar to google maps but with your own maps and data (you can easyly setup your own mapserver (eg http://geoserver.org/)). for the time it is capable of the features you see in the demo like measuring distances, coordinate conversions, displaying different overlays over different basemaps and grouping them all together in one layertree.

as i said above this was all static HTML/JS (ExtJS) and it would have been a pain to create and manage different map constellations! you would have had to copy+paste lots of code to lots of different files/places and if you had to change something "global" (eg support telephone number), you would have had to change it in every single map. because of that i switched it to processwire (and of course to try PW and learn it's concepts  :) ) and it was really a breeze! so the benefit of processwire in that case is managing your maps (copying, adapting all by drag+drop and a few clicks) and extending functionality in a plug-in like way (either to put the code directly in the appropriate field in the pagetree or including a file with that code for global code snippets).

of course that's a very specific field of use - but i thought for that very reason it could be interesting for some of the PW community  :)

...you could use it for example for organisations like ambulance, firebrigade or military in case of any desaster. they could create custom maps of their missions, make them available over internet, secured via password or similar and share all the relevant data with all people involved (eg actual water levels in floods, avalance risk during winter and so on...

  • Like 1

Share this post


Link to post
Share on other sites

Hi zwergo - very interesting project.

I've done a few jobs with maps before but this takes things to a whole new level :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi zwergo,

great project. Thank you for sharing. A lot to learn from your code. I'm really happy that I could convince you to take another look at PW as the right tool for your project.

Cheers

Gerhard

  • Like 5

Share this post


Link to post
Share on other sites

This is a really interesting project, and it looks like something that I can use in an upcoming project.

I wondered about the current state of this. Geowire.org doesn't seem to be up at this point. Is source available?

Many thanks,

Jay

Share this post


Link to post
Share on other sites

Hi Jay,

you can find the source code here: https://gitlab.com/baumrock/geowire

But I have to say that I was not able to install it on my dev laptop any more. I'd have to have a look on my old machine if there is a working version left. Maybe you can get it up and running though. But in general I'd not recommend using it any more. It was my first project and has some concepts that I'd definitely not use any more (like placing files in the root folder). I had no idea about hooks or modules at that time.

Maybe some parts are interesting nevertheless 🙂 

  • Like 1

Share this post


Link to post
Share on other sites
On 4/18/2020 at 3:52 AM, bernhard said:

Hi Jay,

you can find the source code here: https://gitlab.com/baumrock/geowire

But I have to say that I was not able to install it on my dev laptop any more. I'd have to have a look on my old machine if there is a working version left. Maybe you can get it up and running though. But in general I'd not recommend using it any more. It was my first project and has some concepts that I'd definitely not use any more (like placing files in the root folder). I had no idea about hooks or modules at that time.

Maybe some parts are interesting nevertheless 🙂 

Thanks, Bernard. Much appreciation for your work and presence here, and thanks for the lead.

All the best!

Jay

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...