correct format of the Solr Schema 'Location:' field

11 views
Skip to first unread message

Garey Mills

unread,
May 14, 2015, 3:05:06 PM5/14/15
to opengeop...@googlegroups.com
Does anyone know where this is documented for OGP2?

Garey Mills

--
Generate messages about directories that cannot  be
read,  files  that  cannot be opened ... rather than being silent ... 
(from `man du`)

Chris Barnett

unread,
May 18, 2015, 12:33:11 PM5/18/15
to opengeop...@googlegroups.com
Hi Garey,

It is here:

It hasn’t really changed since version 1.1.

I agree that this is hard to find. I’ll add some more info to the readme on github.

thanks,
Chris


--
You received this message because you are subscribed to the Google Groups "OpenGeoportal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opengeoportal-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Garey Mills

unread,
May 18, 2015, 1:31:03 PM5/18/15
to opengeop...@googlegroups.com
Thanks Chris - If I have time to integrate my ungeoreferenced code into OGP2, I will send you a proposed amendment for the Location field for ungeoreferenced images.

Garey

Chris Barnett

unread,
May 18, 2015, 1:57:53 PM5/18/15
to opengeop...@googlegroups.com
Hi Garey,

I’ve done some of this already, but it is untested since I didn’t have any sample data.

Take a look at mapDiv.js:

// a place to store references to external windows and associated data
this.externalPreviewWindows = new OpenGeoportal.ExternalPreviewWindows();
this.openImageCollectionUnGeoReferenced = function(model) {
// this model has attributes to facilitate preview of ImageCollection
// UnGeoreferenced layers
var newModel = new OpenGeoportal.Models.ImageCollectionUnGeoreferenced(
model.attributes);
// adding the model opens the external window
this.externalPreviewWindows.add(newModel);
};
this.closeImageCollectionUnGeoReferenced = function(layerId) {
var model = this.externalPreviewWindows.findWhere({
LayerId : layerId
});
this.externalPreviewWindows.remove(model);
};
/**
*
* @param {string}
* previewType a key that should match up with a "type" property
* @param {string}
* functionType either "onHandler" for the function that turns on
* a layer preview or "offHandler" for the function that turns
* off a layer preview
* @returns {Function} a function that turns on or off a layer depending on
* passed type
*/
this.getPreviewMethod = function(previewType, functionType) {
var previewMethods = [ {
type : "imagecollection",
onHandler : this.openImageCollectionUnGeoReferenced,
offHandler : this.closeImageCollectionUnGeoReferenced
}, {...


in models/externalPreviewWindowsCollection.js there is a listener that calls the ‘openWindow’ function when a layer model from the above code is added to the collection. Also, when the model is added to the collection, it is converted to ‘OpenGeoportal.Models.ImageCollectionUnGeoreferenced which has some additional properties needed for the preview. The url to the ‘gss’ servlet will need to be updated if you’ve changed it (note: this url should probably be in the solr location field to be more self contained…otherwise everyone will have to modify their code any time this url changes, instead of just reharvesting from you). I don’t recall if already does or not, but the gss servlet will need to serve either ‘jsonp’ or have CORS enabled in order for other OGP instances to use your ungeoreferenced layers.

unGeoreferencedWindow.js contains the javascript needed by the opened browser window. This code is similar, if not identical, to code that you sent me before.

Lastly, WEB-INF/views/ungeoreferenced.jsp contains the html for the opened browser window, which is also similar, if not identical to what you sent me.

Let me know how it goes!

thanks,
Chris
Reply all
Reply to author
Forward
0 new messages