Skip to content
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

Configurable tile map #2605

Closed
wants to merge 11 commits into from

Conversation

jimmyjones2
Copy link
Contributor

Closes #1902

Expose configuration of Leaflet to allow custom mapping providers. Example alternative config:

http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg
{ "attribution": "Tiles Courtesy of <a href=\"http://www.mapquest.com/\">MapQuest</a> &mdash; Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency", "subdomains": "1234" }

@jimmyjones2 jimmyjones2 force-pushed the configurable-tile-map branch 2 times, most recently from 9931e25 to b1f112c Compare January 11, 2015 15:09
@@ -43,6 +43,21 @@ define(function (require) {
value: 6,
description: 'The maximum geoHash size allowed in a tile map',
},
'visualization:tileMap:wms': {
value: false,
description: 'Set for WMS mapping provider'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a more complete description of this? Maybe a link to a reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rashidkpc I tried, but HTML tags are shown as is rather than parsed. Any tips on fixing this, my angular knowledge is slim:(

@jimmyjones2
Copy link
Contributor Author

@rashidkpc does this look better? Would you prefer the URL in the code as well and a null default?

subdomains: '1234'
});
var tileLayer;
var tileOptions = config.get('visualization:tileMap:options', '{' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather see the 2nd argument of this be an object vs a concatenated string

…indow and (hopefully) explain WMS option a bit better
@jimmyjones2
Copy link
Contributor Author

@rashidkpc would you mind having another look?

@rashidkpc
Copy link
Contributor

@jthomassie I believe is working on tests for the tile map, can you get with him and come up with some tests for the logic here?

@rashidkpc rashidkpc assigned jthomassie and unassigned rashidkpc Jan 26, 2015
@jimmyjones2
Copy link
Contributor Author

@rashidkpc sorry missed that, hopefully the last commit addresses it

@rashidkpc
Copy link
Contributor

Thanks @jimmyjones2 we're going to hold on this pending tests for the tile map. Once those are ready you can write some tests for this and we can get this in.

@jthomassie jthomassie added the Feature:Vislib Vislib chart implementation label Feb 24, 2015
@jthomassie
Copy link

@jimmyjones2 I'll be working on tile map issues/enhancements over the next couple of weeks. I will get some tests in place for you to build upon.

@rashidkpc
Copy link
Contributor

I've been thinking about this one and it might makes more sense to make this configurable on the per-visualization basis. Maybe we could make the value in this pull the defaults. On the topic of the options object, I'd rather break this out into individual options that are, again, configurable per-visualization.

In general, it would be smart for us to start doing more vis-by-vis, index-by-index, and less global

@jthomassie
Copy link

@rashidkpc I agree that per vis options would be nice, but I think this user config version would be used more widely, and it is an easier first step to employ.

@jthomassie
Copy link

@jimmyjones2 tests for tile map are now in master, along with several other changes.
Please take a look, and let me know if you have any questions. Would like to get your PR merged in.

@jimmyjones2
Copy link
Contributor Author

@jthomassie Will get this sorted in the next week or so

@jimmyjones2
Copy link
Contributor Author

@jthomassie Any suggestions how to write the tests - I'm no JavaScript pro! None of the existing tests get the map object, but even if I could do that, can't see a way to retrieve the current map URL to check if the config has applied?

@jthomassie
Copy link

@jimmyjones2 no problem, I will get back to you soon with a suggestion for how to test this.

@jimmyjones2
Copy link
Contributor Author

@rashidkpc I know you guys are super busy with 4.1 but could you give me a few pointers for the tests? I can't see how to get and query the leaflet object for what URL is set? Or is there a better way to test?

@pickypg
Copy link
Member

pickypg commented May 16, 2015

@jimmyjones2 Unrelated to the request for testings the Javascript, there are a lot of freely available WMS servers. Perhaps more importantly, a lot of the private map resources will be WMS servers rather than TMS servers.

Anyway, here's a list of a ton of WMS servers to test with: http://www.skylab-mobilesystems.com/en/wms_serverlist.html

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@rashidkpc
Copy link
Contributor

Once #4701 goes in feel free to look at how the implementation was done and add TMS support. You probably want a new pull for that though.

@rashidkpc
Copy link
Contributor

Closing in favor of #4701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Vislib Vislib chart implementation tests_needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make tile map source configurable
5 participants