regions

66 posts / 0 new
Last post
Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 11:01
regions

Going to install gmap and probably location module now - see if we can get them working. Once we've got something set up, then we'll have a nearly-finished main index, which'd be lovely.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 11:39

ref:
http://drupal.org/project/location
http://www.acme.com/javascript/#Clusterer
http://www.webgeer.com/gmapdemo

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 13:27

OK this works with a few bugs

The map we'll have to use is this one:

http://libcom.org/map/node (currently only available to admins). Ignore libcom.org/regions-0 - that's not the way apparently.

To add nodes to it, we have to edit the node, then manually enter the lat and long information (there's a google map point and click thing, but it doesn't work - just grey box for me).

I've done this with the Wapping article just to try out.

I think we can also use this: http://drupal.org/project/georss

to add location information to taxonomy terms.

Assuming most of this works, this is what I reckon we should do:

1. Regions
Add georss information for the regions tags (just main ones). This should give us a pointer which will show the last few nodes in that region.
If that works, consider trying it for country and city tags as well (London, France, New York etc.)

2. Regional forums
Same thing as above, but for regional forums - so it shows the past few posts in the North America forum or whatever

3. Nodes
For library and history articles, add location information manually to decent nodes so they show up individually - obviously this'll be much easier if we can get the map-helper thing working. If we can restrict it, could maybe do for big/interesting news articles as well (like Ret's bangladesh stuff).

We can set up different coloured markers for different node types - hopefully do the same for the georss things - so main regions, forums, cities/countries, history/library/news all have a different marker colour associated.

We can also set it up to do long/lat with profiles - and have a seperate user map.

We can make other maps with a filter (the regions-0 one) - but I don't think the markers will appear on those, or at least haven't worked it out yet.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 13:29

by the way - admin settings are split across gmap, location, gmap_location and content-types.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 13:32

http://www.satsig.net/maps/lat-long-finder.htm

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 13:43

alright going to enable the node location map for authenticated users so people can check it out.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 4 2007 14:34

er just looked at this quickly now - can we add taxonomy terms to the map, so someone can just click it to go to that country/city tag?

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 14:41

I thought we could before installing, but I don't think we can easily no. Which is a bit annoying.

Looks like we can only add nodes (and user profiles to a different map if we want).

We might be able to add them manually using the macro syntax with a link to the feed, or we could put in a feature request on the module.

If it turns out to be just nodes - then I reckon we should just do intros to each taxonomy term and link to those instead.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 4 2007 14:43

Still its quite cool, and yeah we should do a feature request. Nice one for getting it setup.

We should do the profile map as well imo

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 14:46

profile map could be pretty good - need to get the map selector (turned off for now) working for that I reckon though.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 16:56

ok feeds work here - but it takes locations per node still - so could have a strikes map or something like that.

I reckon it'll have to be manual links or intros for now. intros will be a lot easier.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 17:06

Reckon for regional maps we might be able to use gmap views - so filter by asia - and get an asia map with all asia content - same for UK, North America etc.

Will try to get content for a few different continents/countries on there now. And will activate for library and intros content types.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 4 2007 18:19

are you using different colours for diff content types? looking pretty fucking cool!

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 20:11

Yeah it's in gmap_location settings.

All you have to do to add one is:

find an article
use the lat/long finder I linked to above to get them for the location (built in map is broken - so switched it off)
edit the node and add the latitude and longitude in.

That's it.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 21:18

it zooms right in to individual streets as well - just found my house on it. So if we can get actual addresses for odd things, that'll also be very cool.

pingtiao's picture
pingtiao
Offline
Joined: 9-10-03
Mar 4 2007 21:36

That looks amazing! How much data needs to be downloaded to view it? Is it lightweight?

Fucking skillz though catch, it is going to be a wicked addition to the site.

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 21:48

The map itself is via google - so it's as fast or slow as google is.

The nodes aren't too heavy - no more than viewing a list anywhere else I think - but if we end up with upwards of 1-200 on there it may well get slow. There's javascript and stuff we can add to reduce load when we've got that many though. Module appears to have just been got ready for 5.0 and not quite finished yet.

It integrates with views as well - so we should be able to set up news/history/library/strikes/forums maps and stuff later on with very little extra work.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 4 2007 21:52

not quite ready yet - is that why u say the built in map isnt working?

Mike Harman
Offline
Joined: 7-02-06
Mar 4 2007 22:20

Not sure - some issues attached to module which mention selection maps and there's no proper 5.0 release yet, just dev versions.

Mike Harman
Offline
Joined: 7-02-06
Mar 5 2007 00:28

reckon we can do a small 280px wide map in the regions block in index - just with markers to the main regions indexes. Need to work out how macros work first.

Mike Harman
Offline
Joined: 7-02-06
Mar 8 2007 18:06

so issues/todo with this:

check updates/patches to see if there's a fix for the node edit map so we can add things easier.

do intros for all the main regions.

Maybe do intros for all regional forums.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 8 2007 19:31

yeah regions, and countries tags too would be cool. although then in map it'd be hard to just select the region wouldn't it? UNLESS - hmmm maybe we could just tag the regions with every country in them? but then i spose we're not using the map very well...

Mike Harman
Offline
Joined: 7-02-06
Mar 8 2007 19:59

Region intros should hopefully be just a placeholder - I'm hoping that we'll be able to use views maps or custom zooming to have UK/North America/Oceania etc. maps which take information from the main node one. Then we can put different style markers manually on the main map pointing to those - that way countries can still go to intros, but in a different colour/size again.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 8 2007 20:05
Mike Harman wrote:
Region intros should hopefully be just a placeholder - I'm hoping that we'll be able to use views maps or custom zooming to have UK/North America/Oceania etc. maps which take information from the main node one. Then we can put different style markers manually on the main map pointing to those - that way countries can still go to intros, but in a different colour/size again.

that would be amazing.

Mike Harman
Offline
Joined: 7-02-06
Mar 8 2007 20:15

Yes it would. It might not be possible yet, but eventually I'm sure we can do it. Basically if we just keep adding nodes to the main map, it ought to just work with that information when it's set up later.

Mike Harman
Offline
Joined: 7-02-06
Mar 9 2007 13:39

ok looks like a lot of bugs with google map are being worked on, so probably worth holding off on anything clever for at least a couple of weeks.

Meanwhile though, looks like maps in adding nodes there's an easy workaround:

http://drupal.org/node/120562

Mike Harman
Offline
Joined: 7-02-06
Mar 13 2007 22:43

latest dev version has a major update with loads of bug fixes. Not installed yet, but I reckon that'll be useable to at least get us started properly.

Mike Harman
Offline
Joined: 7-02-06
Mar 17 2007 12:59

just updated, can now add gmap info in the node edit from.

and user map is switched on, added mine in and it seems to work.

Anyone following this - if you edit your profile you ought to be able to add your latitude and longitude in to show up on this map: http://libcom.org/map/user

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 18:32

this is starting to take shape now:

http://libcom.org/regions/maps?filter0=1026

http://libcom.org/regions/maps?filter0=1029

http://libcom.org/regions/maps?filter0=1030

just needs more location information added to articles and either aliases set up for those urls for the regions, or alternatively working out how to get url arguments by tag.

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 27 2007 10:00

hmmm i'm not sure entirely how that's working. it seems pretty great though.

by urls for the regions, do you mean aliases set up so http://libcom.org/regions/maps/uk goes to http://libcom.org/regions/maps?filter0=1029 or whatever?

can we filter different content types in the same way? so you can have all history in eastern europe, etc.?

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 15:41

OK it works with an exposed filter - the list of regions in the form points to the url with the term id in it.

Yes aliases so regions/maps/uk works for the ones I posted - we might find a better way to do the filtering, and if so can point the alias elsewhere or delete and use url arguments.

We can filter by tags, sectors and content types as well - like the old custom. That's going to look ugly though with the ui (loads of drop down forms on one page) - so should probably do something like regions/maps/custom and have it seperate.

Or again if we can get url arguments going, we could have stuff like:

regions/maps/uk/news
regions/maps/asia/history

which'd be amazing, but I don't think that's quite there yet.

Main thing to bear in mind is that the only information we have to put in is the longitude and latitude for the node. All this filtering is done with views same as it is with news/tags/$tag - so we can go ahead and add the information in now, then the display and different maps can be worked out as we go along.