New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Leaflet WMTS Viewer #17

Merged
merged 4 commits into from May 21, 2015

Conversation

Projects
None yet
3 participants
@u10313335

u10313335 commented May 8, 2015

Try to add WMTS Viewer (plugin name: wmts_view in 2.3 and wmts_preview in 2.2) to ckanext-geoview by using the built-in Leaflet common base layer. Tested with NLSC tile service http://taijiang.tw/en/dataset/wmts/resource/3611e0b9-b8ba-484e-8ebf-344cb111cc08 under CKAN 2.2 and 2.3. Moved from ckan/ckanext-spatial#99.
Current issue: The icon is not added yet.

@amercader

This comment has been minimized.

Member

amercader commented May 11, 2015

Great stuff @u10313335, can you add it a section in the README like the GeoJSON one?

Also what issue exactly do you have with the icons?

@u10313335

This comment has been minimized.

u10313335 commented May 11, 2015

@amercader Okay, I'll add the README ASAP.
The icon issue is about the "WMTS file format icon" and I can't create it by myself.

@amercader

This comment has been minimized.

Member

amercader commented May 11, 2015

I see what you mean.

@pduchesne would that be a matter of editing the included PSD file? Not sure if you need Photoshop for that.

https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/img/gis-resources-sprite-icons.psd

@pduchesne

This comment has been minimized.

pduchesne commented May 11, 2015

well, the important file that's actually used is
gis-resources-sprite-icons.png .
You're free to edit it the way you like, as long as you respect the format
and transparency .
And if you have PS, you can use the psd.

BTW i'm not sure committing my psd work file was very clever.

On Mon, May 11, 2015 at 2:52 PM, Adrià Mercader notifications@github.com
wrote:

I see what you mean.

@pduchesne https://github.com/pduchesne would that be a matter of
editing the included PSD file? Not sure if you need Photoshop for that.

https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/img/gis-resources-sprite-icons.psd


Reply to this email directly or view it on GitHub
#17 (comment).

@amercader

This comment has been minimized.

Member

amercader commented May 11, 2015

sure, I meant editing the PSD file to add a new icon to the sprite and export it to png as I assume it would be easier to edit.
@u10313335 Another option is creating a separate png and making the css point to it rather than to the sprite file, although would be good to keep them all together.

I don't think it's a blocker anyway to get this merged

Update README and file type icon.
Set the layer that contains the bounds specified by WGS84BoundingBox(preferred)/BoundingBox in the metadata.
Add opacity control.
Fix layer control on mobile phone.
Remove coordinates to keep things simple.
@u10313335

This comment has been minimized.

u10313335 commented May 14, 2015

Hi all,
I added the README and file type icon in the latest commit.
Also made some handy features, see the commit log for details. Thank you.

@amercader

This comment has been minimized.

Member

amercader commented May 21, 2015

@u10313335 I had a play with this, it looks good to go. Just a couple of points:

  • Remove the CORS handling on when loading the URL (as in fb8b99a), it causes more trouble than it solves.
  • I wouldn't reset the zoom whenever you change a layer from the manager, it is confusing and users will expect to keep the same view.

All these changes are in this diff, if you are happy just apply and push them and I'll merge the PR.

https://gist.github.com/amercader/1ca3c4df72760ec34c38

@u10313335

This comment has been minimized.

u10313335 commented May 21, 2015

Thanks @amercader. I agreed with you and pushed them as you advised.
P.S. I reset the zoom when changing the layer because there are layers with varied bounding boxes in a certain WMTS resource. I thought maybe it is not the common case.

@amercader amercader merged commit 34b74f3 into ckan:master May 21, 2015

@amercader

This comment has been minimized.

Member

amercader commented May 21, 2015

Great stuff @u10313335, thanks for the patch.

I spent a while trying to figure out why it wasn't working for me any more. Turns out that this line does not play well if the URL already has the ?SERVICE=WMTS bit, as it will duplicate it. Would be good to handle it when you have a moment.

Thanks again

@u10313335

This comment has been minimized.

u10313335 commented May 21, 2015

@amercader Okay, I will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment