mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Simplified TileImageLoader and TileSource, added ImageTileSource, fixed FileDbCache
This commit is contained in:
parent
300c22a2e7
commit
2fd3f5f8f6
12 changed files with 280 additions and 195 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<applicationSettings>
|
||||
<SampleApplication.Properties.Settings>
|
||||
<setting name="UsePersistentCache" serializeAs="String">
|
||||
<value>True</value>
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</SampleApplication.Properties.Settings>
|
||||
</applicationSettings>
|
||||
|
|
|
|||
13
SampleApps/SampleApplication/ImageTileSource.cs
Normal file
13
SampleApps/SampleApplication/ImageTileSource.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace SampleApplication
|
||||
{
|
||||
public class ImageTileSource : MapControl.ImageTileSource
|
||||
{
|
||||
public override ImageSource GetImage(int x, int y, int zoomLevel)
|
||||
{
|
||||
return new BitmapImage(GetUri(x, y, zoomLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -128,6 +128,7 @@
|
|||
TileSource="http://{c}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png"/>
|
||||
<map:TileLayer Name="MapQuest OSM" Description="MapQuest OSM - © {y} MapQuest & OpenStreetMap Contributors"
|
||||
TileSource="http://otile{n}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png"/>
|
||||
|
||||
<!--<map:TileLayer Name="Google Maps" Description="Google Maps - © {y} Google"
|
||||
TileSource="http://mt{i}.google.com/vt/x={x}&y={y}&z={z}" MaxZoomLevel="20"/>
|
||||
<map:TileLayer Name="Google Images" Description="Google Maps - © {y} Google"
|
||||
|
|
@ -138,6 +139,14 @@
|
|||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/a{q}.jpeg?g=0" MaxZoomLevel="20" HasDarkBackground="True"/>
|
||||
<map:TileLayer Name="Bing Hybrid" Description="Bing Maps - © {y} Microsoft Corporation"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/h{q}.jpeg?g=0&stl=h" MaxZoomLevel="20" HasDarkBackground="True"/>-->
|
||||
|
||||
<!-- The TileLayer below uses an ImageTileSource that bypasses caching of map tile images -->
|
||||
|
||||
<map:TileLayer Name="OSM Uncached" Description="© {y} OpenStreetMap Contributors, CC-BY-SA">
|
||||
<map:TileLayer.TileSource>
|
||||
<local:ImageTileSource UriFormat="http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
|
||||
</map:TileLayer.TileSource>
|
||||
</map:TileLayer>
|
||||
</ComboBox.Items>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.225
|
||||
// Runtime Version:4.0.30319.269
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
@ -25,7 +25,7 @@ namespace SampleApplication.Properties {
|
|||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool UsePersistentCache {
|
||||
get {
|
||||
return ((bool)(this["UsePersistentCache"]));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="UsePersistentCache" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="ImageTileSource.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue