Separating search Species box

11 views
Skip to first unread message

Johnson Chetty

unread,
Apr 10, 2015, 9:03:18 AM4/10/15
to opentreemap-user, Nagarjuna G
Hello, 

I was trying to separate the Searchbox for Species search and make it independent of an instance. 
How can one cleanly separate out the search box to point to a 'default' instance and fetch its species? 

(Because most of the species are shared by each instance anyway and I think we could do some schema mapping for this quite easily.)

Btw grunt merges all the js files into treemap.js (~62,200 lines) 4.7MB without minification (in dev mode) and there wasn't too much documentation!

In treeMap.js  Search.init() uses the config object.
I checked up the database and the instance config was not contained in any of the Instance objects generated. 

Where is this config being generated? Do we take it only by parsing the incoming url? If so, can I simply pass on a 

var config = { instance:{url:'my-url'}}
to initDefaults(config) for loading the species suggestions?

Sorry if my question is a little silly, just that I'm not too familiar with Bacon.js and Grunt.js semantics.

Much thanks!

--
Regards,
Johnson Chetty




Justin Walgran

unread,
May 20, 2015, 4:22:40 PM5/20/15
to opentree...@googlegroups.com, Nagarjuna G
Johnson,

Sorry for the delayed response.

I would discourage sharing species rows between instances as I suspect it will likely cause problems. OTM is designed to be run as a service, so all the code ensures that data never mixes between instances. There are places in the core application and the eco benefits service that filter species rows using the current instance, and those filters would start returning empty results.

-Justin

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

Reply all
Reply to author
Forward
0 new messages