1

Topic: Locations in drupal 7

Hi,

I'm wondering if it's possible to add locations in drupal 7 in a way that if you would hit a location on the map, it would import/autofill the location name in the location box. Or the other way around, filling in the location name (would also need to be autofilled with part of the location name) would point the map to the location with a polygon/line/... around the location.
An example of this can be found on 'http://www.observado.org/' when logged in and when you add a sighting. The idea behind it is that our local recording groups work with IFBL codes, a bit similar to grids in the uk but without a epsg code so depending on a shp file.

Oh, and I'm still not able to upload the shapefile to the warehouse. Can I send this zip file with the shapefiles to you John to have a look why I can't upload it?

Next step would be a distribution map based on these locations, but lets start with this first.

2

Re: Locations in drupal 7

Hi Dieter
Clicking on a boundary on the map to fill in the location name in a box would require a bit of custom JavaScript on the page as I've not done anything to support that in the code. However, the location select and location autocomplete controls both allow you to pick a location then it will appear on the map with a polygon drawn.

Presumably the IFBL codes are a notation that describes a square which can be drawn on an x,y coordinate system that does have an EPSG code? If so then we could support IFBL codes in the same way as we support British Grid references, with a little bit of PHP to convert the input grid square notation into the x,y coordinates of the corners of the underlying square. That sounds a better approach in the long run, though it might take a little bit of effort to get this script right.

Yes, Dieter, please send me a zip file to try.

Best wishes
John

John van Breda
Biodiverse IT

3 (edited by dieter 19-12-2014 10:40:58)

Re: Locations in drupal 7

Hi John,

I saw in Irecord that when you select a place, it's drawn on the map, but is it supported in drupal 7? The module is not avaible for drupal 7 as far as I see.
Would it be something you would consider to incorporate in the code in the future, clicking on the map with filling the location name? Because I can imagine people know better the place they went to than the place name (for me it is like this, I almost never know the name of a location).

The shp file for flanders can be downloaded here. http://www.plantenwerkgroep.be/goto.php?document=199 There are 3 different shape files in it. You can choose for the one with uur in the name. I will try to convert a KML file that covers Belgium to a shp file. Don't know if it's gonna work but we will see.

Dieter

4

Re: Locations in drupal 7

Hi Dieter,

We are about to migrate iRecord to Drupal 7. All the modules that we think we need have been ported and are available in the repository.

You might be interested in the files with sref_ prefix in the warehouse modules folder. These contain the code by which various grid reference systems are supported.

Jim Bacon.

5

Re: Locations in drupal 7

Hi Jim,

The problem is that IFBL doesn't have a sref number. John told me that you could code this in php so that Indicia can support this but I don't know excatly how since my knowledgde is just basic (read almost non existing) in developing... I know how the IFBL grid works and I looked into the code to support the britisch grid and it looks very complex to me.