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

Add WMS map server support #4701

Closed

Conversation

rashidkpc
Copy link
Contributor

Closes #1902

Adds WMS map server on a per-map basis. It has a few defaults filled in that I know work, but there aren't exactly many public WMS server out there. I tried approximately 30 of the ones listed in #1902 (comment), they were all down. The only ones I found that had world maps were from the USGS: http://viewer.nationalmap.gov/example/services/serviceList.html

I labelled this as being for advanced users only since getting everything right is important and you generally need to read an XML document to understand what the server supports.

screen shot 2015-08-18 at 11 47 00 am

@tbragin
Copy link
Contributor

tbragin commented Aug 18, 2015

Tried this out, a couple of questions and comments:

  • Should we specify that the "styles" setting, although required, can and in many cases should be left blank?
  • The default settings resulted in an empty map for me, however selecting just layer 0 worked, but resulted in a different looking map
    screen shot 2015-08-18 at 2 48 40 pm
    screen shot 2015-08-18 at 2 54 31 pm
  • Looks like there are some fun maps here, but I couldn't get them to work - they seem to have more required parameters: http://nationalmap.gov/small_scale/infodocs/wms_techinfo.html

@jimmyjones2
Copy link
Contributor

Hey @rashidkpc, how about being able to configure a TMS server (the more popular kind of mapping server), like I did in #2605? Also I think it should be possible to set the default mapping server in advanced settings, having to tell your users what settings to put in every time they do a new map visualization would be tiresome, if for whatever reason they can't or don't want to use the supplied default. I'm happy to fixup #2605 if that would help, although neither PR's have tests.

@tbragin
Copy link
Contributor

tbragin commented Aug 19, 2015

Would also be good to make defaults for these settings configurable.

@rashidkpc
Copy link
Contributor Author

Updated with ability to configure default params as well as ability to turn on wms setting by default.

@rashidkpc rashidkpc mentioned this pull request Aug 19, 2015
@pickypg
Copy link
Member

pickypg commented Aug 19, 2015

WMS supports the idea of layers, so it sounds like the map server that you were hitting may have had a blank layer @tbragin. It's a pretty big nuisance. I wonder if we should a basic low resolution tile (or four) to represent the globe as the true bottom layer?

@tbragin
Copy link
Contributor

tbragin commented Aug 19, 2015

Looks good.

One small thing I noticed is that it's possible to do the following workflow:

  • Start a new tile map
  • Immediately go to Options, w/o setting your Geo Coordinates value
  • Enable WMS server settings
  • Click Apply right in that screen
    => Tile map tries to render, but since we never set Geo Coordinates, it's blank

I wonder if we should gray out the Apply button, unless Geo Coordinates are set in the first screen? This is the current behavior in options, unless you enable WMS server options.

@tbragin
Copy link
Contributor

tbragin commented Aug 19, 2015

I don't know why this might be useful, but here is Logstash data overlayed with DOD expenditures and coal field locations, courtesy of nationalmap.gov ;)

screen shot 2015-08-19 at 4 53 25 pm

screen shot 2015-08-19 at 4 54 13 pm

screen shot 2015-08-19 at 4 56 16 pm

@jimmyjones2
Copy link
Contributor

Similar to the comment above, if you visualize a geo field from Discover, then go to options and enable WMS, you can't click the go button.

@rashidkpc rashidkpc assigned jbudz and unassigned tbragin Aug 24, 2015
'visualization:tileMap:WMSdefaults': {
value: JSON.stringify({
enabled: false,
url: 'http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer',
Copy link
Member

Choose a reason for hiding this comment

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

maybe worth using // or https by default

@jbudz
Copy link
Member

jbudz commented Aug 24, 2015

One comment above, otherwise code LGTM. I was able to reproduce not clicking on go when coming from the discover page.

@jbudz jbudz assigned rashidkpc and unassigned jbudz Aug 24, 2015
@rashidkpc
Copy link
Contributor Author

Indeed this doesn't work when coming from discover, it seems to be caused by the fact that vis.params is empty when coming from discover and a deep clone doesn't take place causing the vis and editableVis to be the exact same object once you get beyond the first level of the params object. Thus angular.equals finds no difference between vis.params and editableVis.params when only properties on editableVis.params.wms are changed

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

Successfully merging this pull request may close these issues.

6 participants