-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow examples to use local files for tiles instead of external data.
This removes the network dependency to openstreetmap.org in the tests. As additional examples are added, the tiles.tgz file will need to be updated.
- Loading branch information
Showing
8 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2f4ea11110deac8f5de053c49d09ce1e | ||
914356846f8c541a813bb7e53efc6c57 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
https://data.kitware.com/api/v1/file/586bfea38d777f05f44a5c6f/download | ||
https://data.kitware.com/api/v1/file/586d1ff18d777f05f44a5c75/download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
73d3e6e8800e5d82d5f668413379373a | ||
765a50e781a0f400068cead89837483e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
https://data.kitware.com/api/v1/file/560a89528d777f7bfaadd3f8/download | ||
https://data.kitware.com/api/v1/file/586d1e958d777f05f44a5c72/download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
/* global dnsDomainIs */ | ||
|
||
function FindProxyForURL(url, host) { | ||
// Don't serve certain remote addresses | ||
if (dnsDomainIs(host, "fonts.googleapis.com")) { | ||
return "PROXY http://192.0.2.0"; | ||
} | ||
return "DIRECT"; | ||
// Don't serve certain remote addresses | ||
if (dnsDomainIs(host, 'fonts.googleapis.com')) { | ||
// If we use a testing address such as 192.0.2.0, requests will take a | ||
// long time to fail. Using an address starting with 0 fails promptly. | ||
return 'PROXY 0.0.0.1'; | ||
} | ||
// Redirect tiles to our test server | ||
if (dnsDomainIs(host, '.tile.openstreetmap.org')) { | ||
return 'PROXY 127.0.0.1:9876'; | ||
} | ||
return 'DIRECT'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters