jyobb / islandora_map_browse

Map browser for islandora
3 stars 5 forks source link

Configuring the module #9

Open petermacdonald opened 8 years ago

petermacdonald commented 8 years ago

John:

​I've upgraded to Islandora HEAD (as of Jan 30, 2016)​ and using the latest DGI Solr Schema and am trying out the Islandora Map Browse module again.

​Unfortunately, ​ I can't seem to ​locat​e​ a copy of Leaflet 0.7.3 anymore​ (as recommended in the Readme file)​, so I tried version 0.7.6, but with that version I can't get Map Browse to work -- though it's more likely ​than not ​that it's something I'm​ still​ not doing right myself.

​Try:

http://sci-dev.dhinitiative.org/islandora/search/mods_subject_cartographics_coordinates_ms%3A%5B*%20TO%20*%5D?type=edismax&solr_profile=MapView

​​​1. ​I get as far a seeing the icons on the results page, but the map produced always uses the default coordinates with no pins.​

  1. ​Also, the link View Geolocated Items throws red notice messages like this:

Notice: Undefined index: PID in prepareStaticMapGEOJSONConfig() (line 112 of /home/dhiham/public_html/sites/all/modules/islandora_map_browse/includes/IslandoraSolrResultsMapView.inc). Notice: Undefined index: mods_titleInfo_title_s in prepareStaticMapGEOJSONConfig() (line 114 of /home/dhiham/public_html/sites/all/modules/islandora_map_browse/includes/IslandoraSolrResultsMapView.inc) ...

It DOES, however, show a map below these notices, but there are no pins.

​3. Also the autogenerated "Browse Repository URL" shown at the top of the config menu page is this:

http://fedora.hamilton.edu:8080/islandora/search/mods_subject_cartographics_coordinates_ms:[ TO ]?type=edismax&solr_profile=MapView

But that results in a 404 because "islandora/search" should not be matched together with "fedora.hamilton.edu:8080".

​4. This one is just probably an out-of-date Readme file thing. In the Solr Settings menu I see these two "Secondary display profiles":

but the Readme file says the profiles are named as follows:

I don't want to spend a lot of time struggling with the module, if I ​should be running only Leaflet 0.7.3.

Below is a screen print of my configuration page:

map-config

I guess my questions are:

  1. Do I need the specific Leaflet version 0.7.3?
  2. How do get rid of the "undefined" notices in #2.
  3. Why is the URL in #3 as it is?
  4. Does the Readme file need updating?

Don't get me wrong, I'm not criticizing you or the module, I'm happy to help refine it and try to make it more broadly usable by others in the Islandora community by testing it this way.

Many thanks, Peter

jyobb commented 8 years ago

Peter,

I have been meaning to take a look at this module for a while because I am not really happy with it. I'll dedicate some time to it this week and try to address is problems you have discovered.

  1. I have not tested any other version of leaflet but will do so this week.
  2. The undefined field indicates a record the did not have a field that is defined in the 'Feilds to Return from Solr' configuration. I'll look at handling this more gracefully.
  3. I did not name that configuration option very well. It is meant to be the islandora base url. The one on my test server is: http://islandorasev-dev.usask.ca/islandora/search/mods_subject_cartographics_coordinates_ms:[ TO ]?type=edismax&solr_profile=MapView

This is supposed to do a search for all items with geolocation information.

  1. I am pretty sure the Readme is out of date.

John

On Sun, Feb 7, 2016 at 10:29 PM, Peter MacDonald notifications@github.com wrote:

John:

​I've upgraded to Islandora HEAD (as of Jan 30, 2016)​ and using the latest DGI Solr Schema and am trying out the Islandora Map Browse module again.

​Unfortunately, ​ I can't seem to ​locat​e​ a copy of Leaflet 0.7.3 anymore​ (as recommended in the Readme file)​, so I tried version 0.7.6, but with that version I can't get Map Browse to work -- though it's more likely ​than not ​that it's something I'm​ still​ not doing right myself.

​Try:

http://sci-dev.dhinitiative.org/islandora/search/mods_subject_cartographics_coordinates_ms%3A%5B*%20TO%20*%5D?type=edismax&solr_profile=MapViewhttp://sci-dev.dhinitiative.org/islandora/search/mods_subject_cartographics_coordinates_ms%3A%5B*%20TO%20*%5D?type=edismax&solr_profile=MapView%E2%80%8B

​​​1. ​I get as far a seeing the icons on the results page, but the map produced always uses the default coordinates with no pins.​

  1. ​Also, the link View Geolocated Items throws red notice messages like this:

Notice: Undefined index: PID in prepareStaticMapGEOJSONConfig() (line 112 of /home/dhiham/public_html/sites/all/modules/islandora_map_browse/includes/IslandoraSolrResultsMapView.inc). Notice: Undefined index: mods_titleInfo_title_s in prepareStaticMapGEOJSONConfig() (line 114 of /home/dhiham/public_html/sites/all/modules/islandora_map_browse/includes/IslandoraSolrResultsMapView.inc) ...

It DOES, however, show a map below these notices, but there are no pins.

​3. Also the autogenerated "Browse Repository URL" shown at the top of the config menu page is this:

http://fedora.hamilton.edu:8080/islandora/search/mods_subject_cartographics_coordinates_ms:[ TO ]?type=edismax&solr_profile=MapView

But that results in a 404 because "islandora/search" should not be matched together with "fedora.hamilton.edu:8080".

​4. This one is just probably an out-of-date Readme file thing. In the Solr Settings menu I see these two "Secondary display profiles":

  • Single page GeoJSON View
  • All Geojson

but the Readme file says the profiles are named as follows:

  • View All Results on Map
  • Paged Map View

I don't want to spend a lot of time struggling with the module, if I ​should be running only Leaflet 0.7.3.

Below is a screen print of my configuration page:

[image: map-config] https://cloud.githubusercontent.com/assets/693785/12878365/892fa046-cdf1-11e5-99c2-a56578227b16.PNG

I guess my questions are:

  1. Do I need the specific Leaflet version 0.7.3?
  2. How do get rid of the "undefined" notices in #2 https://github.com/jyobb/islandora_map_browse/pull/2.
  3. Why is the URL in #3 https://github.com/jyobb/islandora_map_browse/issues/3 as it is?
  4. Does the Readme file need updating?

Don't get me wrong, I'm not criticizing you or the module, I'm happy to help refine it and try to make it more broadly usable by others in the Islandora community by testing it this way.

Many thanks, Peter

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9.

petermacdonald commented 8 years ago

Excellent. Glad you are willing to take a look at it. I'll work with it some more myself. It has great potential for many users. At the iConference in PEI last August some of us met with interest in GIS, which is bigger than any one module can handle, but it indicates that there are use known cases among Islandora users for basic mapping services and your model addresses one of them. Peter

jyobb commented 8 years ago

Peter,

  1. I have updated the version of leaflet.
  2. You should not longer get the undefined fields error. I have changed the configuration page so that you need to add a field name and solr field. The code simply does not add those that do not exist.
  3. This has been fixed in the documentation.
  4. I have updated the README to reflect what the code says.
petermacdonald commented 8 years ago

Good news. I'll give it a spin, which I'm done pulling my hair out over another project -- if I have any hair left. ;-)

Thank you for working on this. I hope it finds good use. Peter

On Mon, Feb 22, 2016 at 5:33 PM, jyobb notifications@github.com wrote:

Peter,

  1. I have updated the version of leaflet.
  2. You should not longer get the undefined fields error. I have changed the configuration page so that you need to add a field name and solr field. The code simply does not add those that do not exist.
  3. This has been fixed in the documentation.
  4. I have updated the README to reflect what the code says.

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187419042 .

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

petermacdonald commented 8 years ago

Hi John:

I'm getting back to testing the "Islandora map browse" module again.

I got it working, but I thought I'd mention my path getting them.

After replacing the old modules (IMB and Leaflet) and grabbing a new copy of "Leaflef.markerCluster", things started working.

I did have to fiddle quite a bit with the IMB config page though.

For a long time I wasn't getting any pins on the map. It was just defaulting to the default coordinates.

In the end I had to "download a zip" copy of "Leaflet.Markerclust". I had used git clone and that resulted in an incomplete set of files in that directory. The zip file version fixed that.

I now see pins on the map properly, but the Watchdog log still is showing "Undefined index" Notices.

[image: Inline image 3]

I then tried selecting only "Single page map view".

But when I run http://cwl-dev.dhinitiative.org/browsemap, the map is good (yipee!), but I get more "Undefined offset" Notices as follows.

[image: Inline image 2]

It's quite possible, I'm not getting things installed properly in the first place.

Any advice? Should I start over? I hate to since the map is working -- pretty much. Can I safely just ignore these Notices?

Thanks, Peter

On Mon, Feb 22, 2016 at 5:33 PM, jyobb notifications@github.com wrote:

Peter,

  1. I have updated the version of leaflet.
  2. You should not longer get the undefined fields error. I have changed the configuration page so that you need to add a field name and solr field. The code simply does not add those that do not exist.
  3. This has been fixed in the documentation.
  4. I have updated the README to reflect what the code says.

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187419042 .

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

jyobb commented 8 years ago

Peter,

I appreciate your patience and feedback. I'll update the README to better describe how to get the markercluster library installed. I was having some issues pushing this file to git because I'm learning git as I go along. I cannot see the image that contains the undefined index error. If you can send the text of this error I'll look at it right away.

John

On Tue, Feb 23, 2016 at 4:57 PM, Peter MacDonald notifications@github.com wrote:

Hi John:

I'm getting back to testing the "Islandora map browse" module again.

I got it working, but I thought I'd mention my path getting them.

After replacing the old modules (IMB and Leaflet) and grabbing a new copy of "Leaflef.markerCluster", things started working.

I did have to fiddle quite a bit with the IMB config page though.

For a long time I wasn't getting any pins on the map. It was just defaulting to the default coordinates.

In the end I had to "download a zip" copy of "Leaflet.Markerclust". I had used git clone and that resulted in an incomplete set of files in that directory. The zip file version fixed that.

I now see pins on the map properly, but the Watchdog log still is showing "Undefined index" Notices.

[image: Inline image 3]

I then tried selecting only "Single page map view".

But when I run http://cwl-dev.dhinitiative.org/browsemap, the map is good (yipee!), but I get more "Undefined offset" Notices as follows.

[image: Inline image 2]

It's quite possible, I'm not getting things installed properly in the first place.

Any advice? Should I start over? I hate to since the map is working -- pretty much. Can I safely just ignore these Notices?

Thanks, Peter

On Mon, Feb 22, 2016 at 5:33 PM, jyobb notifications@github.com wrote:

Peter,

  1. I have updated the version of leaflet.
  2. You should not longer get the undefined fields error. I have changed the configuration page so that you need to add a field name and solr field. The code simply does not add those that do not exist.
  3. This has been fixed in the documentation.
  4. I have updated the README to reflect what the code says.

— Reply to this email directly or view it on GitHub < https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187419042

.

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187953227 .

petermacdonald commented 8 years ago

​Hi John​ ​

First, here are the Notices I get when clicking the IMB icon to display a map for a results set of 4 items with coordinates

Here is the URL: http://cwl-dev.dhinitiative.org/islandora/object/cwl%3A1/manuscript/manuscripts?islandora_solr_search_navigation=0&solr_profile=MapGEOJSONView&width=1000&height=800&iframe=true

Here are the Watchdog entries:

php02/24/2016 - 12:49Notice: Use of undefined constant ‘gzip’ - assumed '... http://cwl-dev.dhinitiative.org/admin/reports/event/1696pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Undefined index: ‘HTTP_ACCEPT_ENCODING’ in... http://cwl-dev.dhinitiative.org/admin/reports/event/1695pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Use of undefined constant ‘HTTP_ACCEPT... http://cwl-dev.dhinitiative.org/admin/reports/event/1694pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Undefined index: dc.title in... http://cwl-dev.dhinitiative.org/admin/reports/event/1693pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Undefined index: dc.title in... http://cwl-dev.dhinitiative.org/admin/reports/event/1692pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Undefined index: dc.title in... http://cwl-dev.dhinitiative.org/admin/reports/event/1691pmacdona http://cwl-dev.dhinitiative.org/user/2 php02/24/2016 - 12:49Notice: Undefined index: dc.title in... http://cwl-dev.dhinitiative.org/admin/reports/event/1690pmacdona http://cwl-dev.dhinitiative.org/user/2

FYI: My site uses the Manuscript Solution Pack, which has a weird starting page: "cwl:1/manuscript/manuscript". [Not sure that makes any difference to our discussion though.']

Second, The map generated as discussed above always displays in its own window, not within the framework of the Drupal/Islandora theme.

Third, The URL "http://cwl-dev.dhinitiative.org/browsemap" generates a map fine, but it doesn't detect any Fedora objects, so there are no pins.

​As always, thank you for looking into this.

Peter

On Wed, Feb 24, 2016 at 11:10 AM, jyobb notifications@github.com wrote:

Peter,

I appreciate your patience and feedback. I'll update the README to better describe how to get the markercluster library installed. I was having some issues pushing this file to git because I'm learning git as I go along. I cannot see the image that contains the undefined index error. If you can send the text of this error I'll look at it right away.

John

On Tue, Feb 23, 2016 at 4:57 PM, Peter MacDonald <notifications@github.com

wrote:

Hi John:

I'm getting back to testing the "Islandora map browse" module again.

I got it working, but I thought I'd mention my path getting them.

After replacing the old modules (IMB and Leaflet) and grabbing a new copy of "Leaflef.markerCluster", things started working.

I did have to fiddle quite a bit with the IMB config page though.

For a long time I wasn't getting any pins on the map. It was just defaulting to the default coordinates.

In the end I had to "download a zip" copy of "Leaflet.Markerclust". I had used git clone and that resulted in an incomplete set of files in that directory. The zip file version fixed that.

I now see pins on the map properly, but the Watchdog log still is showing "Undefined index" Notices.

[image: Inline image 3]

I then tried selecting only "Single page map view".

But when I run http://cwl-dev.dhinitiative.org/browsemap, the map is good (yipee!), but I get more "Undefined offset" Notices as follows.

[image: Inline image 2]

It's quite possible, I'm not getting things installed properly in the first place.

Any advice? Should I start over? I hate to since the map is working -- pretty much. Can I safely just ignore these Notices?

Thanks, Peter

On Mon, Feb 22, 2016 at 5:33 PM, jyobb notifications@github.com wrote:

Peter,

  1. I have updated the version of leaflet.
  2. You should not longer get the undefined fields error. I have changed the configuration page so that you need to add a field name and solr field. The code simply does not add those that do not exist.
  3. This has been fixed in the documentation.
  4. I have updated the README to reflect what the code says.

— Reply to this email directly or view it on GitHub <

https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187419042

.

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

— Reply to this email directly or view it on GitHub < https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-187953227

.

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-188325732 .

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

petermacdonald commented 8 years ago

Hi John.

I thought I should tell you that I got rid of some of the Watchdog Notices by directly editing the file:

/includes/IslandoraMapBrowse.inc

On lines 388-389, ​I changed ​the original quotation marks/apostrophes around the following three items to straight ones as follows:

​'HTTP_ACCEPT_ENCODING' 'gzip' ​'ob_gzhandler'

Drupal likes the straight quotation marks better.

I'll keep reporting on my experiences. I hope you don't mind all the intrusions.

Peter

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

petermacdonald commented 8 years ago

John:

I got rid of the "Undefined index: dc.title..." Notices by putting "dc.title" in the "Solr Title Field" in the IMB config form.

I had put "mods_titleInfo_title" in that field (which I thought would be okay).

BTW: The full Notice message had been: Undefined index: dc.title in IslandoraMapBrowse->prepareSolrResultsGEOJSONConfig() (line 368 of _/home/dhiham/public_html/sites/all/modules/islandora_mapbrowse/includes/IslandoraMapBrowse.inc ).

but it's gone now after I changing to "dc.Title".

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

jyobb commented 8 years ago

I'll fix up the quotes in the code right away.

The code has dc.title as required field and I did not have it setup in the solr query. I'll fix this right away by adding a configuration option so that you can tell the module what solr field to grab the title from.

I appreciate a second set of eyes on this. I'm hoping this module can be easily used by others.

John

On Wed, Feb 24, 2016 at 1:50 PM, Peter MacDonald notifications@github.com wrote:

John:

I got rid of the "Undefined index: dc.title..." Notices by putting "dc.title" in the "Solr Title Field" in the IMB config form.

I had put "mods_titleInfo_title" in that field (which I thought would be okay).

BTW: The full Notice message had been: Undefined index: dc.title in IslandoraMapBrowse->prepareSolrResultsGEOJSONConfig() (line 368 of

_/home/dhiham/public_html/sites/all/modules/islandora_mapbrowse/includes/IslandoraMapBrowse.inc ).

but it's gone now after I changing to "dc.Title".

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-188427417 .

petermacdonald commented 8 years ago

John:

Just another update.

I had not enabled colorbox yet on this new sites, so the maps were not opening up in a popup (modal?) window.

Once I enabled "Enable Colorbox load" (admin/config/media/colorbox), the map shows up in a frame on top of the page behind it.

This is really just a local setting and not an issue with IMB.

Peter

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

jyobb commented 8 years ago

I'll add that to the documentation.

On Wed, Feb 24, 2016 at 2:01 PM, Peter MacDonald notifications@github.com wrote:

John:

Just another update.

I had not enabled colorbox yet on this new sites, so the maps were not opening up in a popup (modal?) window.

Once I enabled "Enable Colorbox load" (admin/config/media/colorbox), the map shows up in a frame on top of the page behind it.

This is really just a local setting and not an issue with IMB.

Peter

Peter MacDonald, Library Information Systems Specialist Hamilton College Library Clinton, New York 315 859-4493 pmacdona-hamilton (Skype)

— Reply to this email directly or view it on GitHub https://github.com/jyobb/islandora_map_browse/issues/9#issuecomment-188431912 .

pautri commented 8 years ago

Hello John, very nice module, thanks for sharing it. I just ran into a few issues when installing and configuring the module:

I was also wondering about the performance issue you mention and the need to have a static file. With how many objects did you run into this and how long was the delay?

Best regards,

Paul

jyobb commented 8 years ago

Paul,

I'll fix up the markercluster path and url name right away. As to the performance issue originally I was using this module as part of a graduate school program and was working with the canadian geonames database which was quite large. Unfortunately, I cannot remember the details. A full repository browse screen that pulled from solr every time can be created by adding the correct link. I'll put something in the documentation.

I'll try and add something to the documentation that makes it clear what version of solr/fedora I am using and give an example of the solr output.