nasa-jpl-memex / GeoParser

Extract and Visualize location from any file
Apache License 2.0
52 stars 23 forks source link

Changed popup content #56

Closed antrromet closed 8 years ago

antrromet commented 8 years ago

@smadha @chrismattmann As per our discussion I've added the code for the popup content to show more metadata fields. I think the code is very self explanatory.

As of now I've hard coded the fields here. We will have to change this so as to get the metadata fields from the solr index.

Also, I've added a simple UI in the index.html file here for the metadata fields.

Let me know if you have any doubts.

smadha commented 8 years ago

super awesome.

Thanks a lot @antrromet I will add code to save/pull metadata fields to/from the admin core.

Thanks for contribution.

chrismattmann commented 8 years ago

please merge :+1:

smadha commented 8 years ago

@antrromet I merged your changes but there are some issues with it.

Seems like there is no cross domain support. Error on js console -

Failed to load resource: the server responded with a status of 404 (Not Found)
XMLHttpRequest cannot load http://localhost:8983/solr/new_core//select?q=id:%22undefined%22&wt=json&indent=true. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. The response had HTTP status code 404.

Also can you make it fail safe? so even if we are not able to fetch fields from index we still see the old popup?

@MBoustani Lets not redeploy till this is fixed.

smadha commented 8 years ago

I fixed the fail safe part. 8f7035d

Also I will suggest using jsonp for this. I saw you used XMLHttpRequest, I will recommend using jquery ajax with datatype "jsonp".

I this this is how it's done in facetview. https://github.com/chrismattmann/facetview/blob/master/jquery.facetview.js#L1364

Key is jsonp: "json.wrf"

Let me know if you think otherwise

antrromet commented 8 years ago

@smadha Oops. I guess am a little late. Even I did the exact same thing and made another pull request. That can be ignored now.