Skip to content

Commit

Permalink
Continued changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakercp committed Jun 14, 2018
1 parent b036af8 commit db832aa
Show file tree
Hide file tree
Showing 18 changed files with 171 additions and 387 deletions.
245 changes: 67 additions & 178 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,192 +1,81 @@
docs/html
docs/tagfile.xml
docs/*.tag
# A .gitignore for openFrameworks addons.

_*/
################################################################################
# Documentation
################################################################################

raw/
# Doxygen-Related
docs/html/*
docs/*
!docs/Doxyfile

exampl*/.compiler*
exampl*/config.make
exampl*/Makefile
exampl*/Project.xcconfig
exampl*/*.xcodeproj
exampl*/*.plist
# Instructions and other documentation files.
!docs/*.md
!docs/*.txt

*.sln
*.vcxproj
*.vcxproj.filters
icon.rc
################################################################################
# Examples
################################################################################

*.mode1v3
# bin/data Folder
example**/bin/*
example**/bin/data/*
!example**/bin/data
!example**/bin/data/data.txt

# xcode
*.pbxuser
*.perspectivev3
xcuserdata
build
*.app
#*.a

# OSX
.DS_Store
.AppleDouble
# Project files
example**/*.xcodeproj
example**/*.xcconfig
example**/config.make
example**/Makefile
example**/*.plist
!example**/addons.make


################################################################################
# Libraries
################################################################################

# Exclude 3rd party libs by default.
libs/*

# Don't exclude ofx libs by default.
!libs/ofx*

################################################################################
# Shared Data
################################################################################

# codeblocks
*.layout
example/obj
shared/data/*
!shared/data/*.sh

# Win
*.exe
*.dll
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
################################################################################
# Scripts
################################################################################

# User-specific files
*.suo
*.user
*.sln.docstates
# Everything included by default.

# Build results
################################################################################
# Build Artifacts
################################################################################

[Dd]ebug/
[Rr]elease/
x64/
# Default Qt Creator Build Folders
build-example*/

# Xcodebuild build folders
build/
[Bb]in/
[Oo]bj/

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap

################################################################################
# Utility Stuff
################################################################################

# Local folders, use for temporary storage, etc.
__*/*

# Temporary files.
*.autosave

# OSX
.DS_Store
.AppleDouble
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "scripts/ofx"]
path = scripts/ofx
url = https://github.com/bakercp/ofx.git
2 changes: 1 addition & 1 deletion addon_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ meta:
ADDON_URL = http://github.com/bakercp/ofxMaps

common:
ADDON_DEPENDENCIES = ofxHTTP ofxGeo
ADDON_DEPENDENCIES = ofxHTTP ofxGeo ofxCache ofxSQLiteCpp ofxSpatialHash ofxTaskQueue
4 changes: 2 additions & 2 deletions example/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
int main()
{
ofGLWindowSettings settings;
settings.setSize(1280,768);
settings.setSize(1280, 768);
settings.setGLVersion(3, 2);
settings.windowMode = OF_WINDOW;
settings.windowMode = OF_FULLSCREEN;
auto window = ofCreateWindow(settings);
auto app = std::make_shared<ofApp>();
return ofRunApp(app);
Expand Down
20 changes: 10 additions & 10 deletions example/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@ void ofApp::setup()
{ 41.1124688, -92.4169922 },
{ 42.1959688, -93.2958984 },
{ 43.2932003, -92.1972656 },
{ 44.0560117, -90.7470703 }
{ 44.0560117, -90.7470703 }
};

ofJson json = ofLoadJson("provider.json");//["providers"][3];
ofJson json = ofLoadJson("provider.json");

tileProvider = std::make_shared<ofxMaps::MapTileProvider>(ofxMaps::MapTileProvider::fromJSON(json));
Poco::ThreadPool::defaultPool().addCapacity(64);
bufferCache = std::make_shared<ofxMaps::MBTilesCache>(*tileProvider, ofToDataPath("tiles", true));

bufferCache = std::make_shared<ofxMaps::MBTilesCache>(*tileProvider, "cache/");
tileSet = std::make_shared<ofxMaps::MapTileSet>(1024,
tileProvider,
bufferCache);

tileLayer = std::make_shared<ofxMaps::MapTileLayer>(tileSet, 1280, 768);
tileLayer = std::make_shared<ofxMaps::MapTileLayer>(tileSet, 1 * 1920, 1 * 1080);

ofxGeo::Coordinate chicago(41.8827, -87.6233);
ofxGeo::Coordinate bethel(45.0579, -93.1605);
Expand All @@ -56,9 +55,10 @@ void ofApp::update()

void ofApp::draw()
{
ofBackgroundGradient(ofColor(255), ofColor(0));
ofFill();
ofSetColor(255);
// ofScale(0.25, 0.25, 1);
// ofBackgroundGradient(ofColor(255), ofColor(0));
// ofFill();
// ofSetColor(255);

// cam.begin();
ofPushMatrix();
Expand Down Expand Up @@ -90,8 +90,8 @@ void ofApp::keyPressed(int key)
{
if (key == 'f' || key == 'F')
{
ofToggleFullscreen();
}
ofToggleFullscreen();
}
else if (key == '-')
{
tileLayer->setCenter(tileLayer->getCenter().getZoomedBy(-1));
Expand Down
Loading

0 comments on commit db832aa

Please sign in to comment.