ClemensFischer / XAML-Map-Control

XAML Map Control Library
Microsoft Public License
203 stars 59 forks source link

How to show OrthoLayer + OverlayLayer? #29

Closed JochenAuinger closed 6 years ago

JochenAuinger commented 6 years ago

Hi!

First of all: Thanks for your great work!!!

Now to my problem: I´m using basemap.at as map source and they provide some different types of maps. There are e.g. the Basemap, the BasemapOrtho, the BasemapOverlay and some others.

What I want to accomplish is, that as "background layer" the BasemapOrtho is used (this works right now; see layer definitions below). So a beautiful, fast and free map is shown. But I need to show streets and house numbers on top of the map -> that´s the BasemapOverlay. So actually I want to show 2 layers on top of each other.

In the end I want to be able to select the following maps in my application: 1) Basemap 2) BasemapOrtho (without street names and house numbers) 3) BasemapOrtho + BasemapOverlay (= "Full Map")

Please help me to accomplish this. Thanks in advance.

Best regards Jochen

Here you can find the full capabilities of basemap.at: https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml

A working web sample you can find here: https://www.basemap.at/application/index.html#{"center":[1598143.6886957795,6150084.137188095],"zoom":19,"rotation":0,"layers":"10000000"}

Here are the definitions of the mentioned layers: { "Basemap", new MapTileLayer { SourceName = "Basemap", Description = "© basemap.at", TileSource = new TileSource { UriFormat = "https://maps.wien.gv.at/basemap/geolandbasemap/normal/google3857/{z}/{y}/{x}.png" }, MaxZoomLevel = 20 } }, { "BasemapOrtho", new MapTileLayer { SourceName = "BasemapOrtho", Description = "© basemap.at", TileSource = new TileSource { UriFormat = "https://maps1.wien.gv.at/basemap/bmaporthofoto30cm/normal/google3857/{z}/{y}/{x}.jpg" }, MaxZoomLevel = 20 } }, { "BasemapOverlay", new MapTileLayer { SourceName = "BasemapOverlay", Description = "© basemap.at", TileSource = new TileSource { UriFormat = "https://maps.wien.gv.at/basemap/bmapoverlay/normal/google3857/{z}/{y}/{x}.png" }, MaxZoomLevel = 20 } }

ClemensFischer commented 6 years ago

What exactly isn't working in your code? The sample applications show how a seamarks overlay layer can be switched on and off. Did you try something like that?

JochenAuinger commented 6 years ago

Yes, I did try it like that, but it just didn't work. I'll give it another try from scratch - maybe my surrounding application caused the problem.

Von meinem Samsung Galaxy Smartphone gesendet.

-------- Ursprüngliche Nachricht -------- Von: Clemens notifications@github.com Datum: 20.08.18 18:49 (GMT+01:00) An: ClemensFischer/XAML-Map-Control XAML-Map-Control@noreply.github.com Cc: Jochen Auinger auinger@ngs.at, Author author@noreply.github.com Betreff: Re: [ClemensFischer/XAML-Map-Control] How to show OrthoLayer + OverlayLayer? (#29)

What exactly isn't working in your code? The sample applications show how a seamarks overlay layer can be switched on and off. Did you try something like that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ClemensFischer/XAML-Map-Control/issues/29#issuecomment-414385517, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aok5OOcA2FWfEijOhUocJmJKUoxWf0RRks5uSuiWgaJpZM4WEQDI.

ClemensFischer commented 6 years ago

These layers are working fine for me. You would have to switch between Basemap and BasemapOrtho as it is done in the same application for the different base layers. For "full map" use BasemapOrtho as base layer plus an additional MapTileLayer for BasemapOverlay, similar to an active Seamarks layer in the sample application.

JochenAuinger commented 6 years ago

Finally it works – I have made a (dumb) error, that I haven´t found for ages (or at least it felt like that ;-) ). Now it works like a charm. Thanks!

Von: Clemens notifications@github.com Gesendet: Montag, 20. August 2018 21:04 An: ClemensFischer/XAML-Map-Control XAML-Map-Control@noreply.github.com Cc: Jochen Auinger auinger@ngs.at; Author author@noreply.github.com Betreff: Re: [ClemensFischer/XAML-Map-Control] How to show OrthoLayer + OverlayLayer? (#29)

These layers are working fine for me. You would have to switch between Basemap and BasemapOrtho as it is done in the same application for the different base layers. For "full map" use BasemapOrtho as base layer plus an additional MapTileLayer for BasemapOverlay, similar to an active Seamarks layer in the sample application.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ClemensFischer/XAML-Map-Control/issues/29#issuecomment-414427254, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aok5OMj7bY7iwvw-7CINwVzSYakRqcffks5uSwgQgaJpZM4WEQDI.