-
Notifications
You must be signed in to change notification settings - Fork 14
add the ability to set layer thumbnail #173
Conversation
Not sure if you saw the existing work on this: #144 |
did you also write a new endpoint (thumbnail/react) or how does this work? |
the new end point will handle this post request and create resource thumbnail |
@bartvde I will Create pull request to geonode now to add the new endpoint |
@hishamkaram any chance you can refactor your js code so that the core code is in |
ok no problem I am going to do that |
@bartvde could I create pull request to geonode to add the new endpoint?! |
We can use the same old point for react and geoexplorer by sending post paramter to determine the type of layer preview |
let's discuss with @jj0hns0n and @milafrerichs about the geonode endpoint, guys, any input? |
@bartvde ok , also now I use the same ENDPOINT |
src/components/geonode.jsx
Outdated
endpoint: 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', | ||
standard: 'XYZ', | ||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community', | ||
thumbnail: 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/0/0/0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should do it this way, this is normally managed on the Django side in geonode for the base maps. Imagine people in a disconnected environment.
src/components/geonode.jsx
Outdated
@@ -158,6 +167,7 @@ class GeoNodeViewer extends React.Component { | |||
mapUrl = (<MapUrlLink/>); | |||
} | |||
} | |||
console.log(this.state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log statement
@hishamkaram let's keep this PR for the thumbnail, and not add other stuff in here, this will make it easier to review and merge. TIA |
@bartvde last commit was reverted |
can you refresh my memory and explain why we need a new endpoint? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With all the line changes it's hard to determine what is added and what is just a style change.
Can you explain why you changed the style of certain lines?
sure, in this case we post the image data, in the old case we posted the html of the full map div I believe and printed server-side. It can still be one endpoint if we can distinguish the two modes from the payload
…Sent from my iPhone
On 30 May 2017, at 17:14, Mila Frerichs ***@***.***> wrote:
can you refresh my memory and explain why we need a new endpoint?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No need for the new endpoint . I added a condition to skip generating image in server side if react is the sender because the Image blob would be in the request body. Please review this pull request in geonode here @milafrerichs @bartvde |
I.e I use the old ENDPOINT and check if react (geonode client ) is the sender in this point |
@milafrerichs @bartvde is this ok to merge or does it need more changes? |
@hishamkaram can you rebase this on master to see if it fixes the tests? TIA |
ok no Problem @bartvde |
setThumbnail Function for geonode-client instead of geoexplorer one
base code now reside in src/service/geonode.js
@bartvde Done |
you can find details about changes in geonode here |
thank you @hishamkaram |
thanks @hishamkaram |
setThumbnail Function for geonode-client instead of geoexplorer one
Whart does this PR do?
add setThumbnail Function for geonode-client instead of geoexplorer one.
now in geonode we need to call the new function something like this:
Screenshot
Related Issue
#88