tag:blogger.com,1999:blog-28936335290758012182024-03-09T18:46:38.540-08:00mousebird consultingWe're the makers of Maply and WhirlyGlobe, 3D toolkits for flat map and globe display on iPad, iPhone, and Android devices.
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.comBlogger174125tag:blogger.com,1999:blog-2893633529075801218.post-89703094754322810952021-04-01T14:06:00.002-07:002021-04-01T14:06:15.610-07:00New Post: Version 3.2<p> Psst! Hey you! Yes, you! The mousebird consulting blog <a href="https://mousebirdconsulting.netlify.app/whirlyglobe-3-2/">moved</a>. And there's a <a href="https://mousebirdconsulting.netlify.app/whirlyglobe-3-2/">new version of the toolkit</a>.</p>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-45031999599804102702021-02-24T10:32:00.002-08:002021-02-24T10:36:17.987-08:00 New Blog: Location Tracking For Android<p> We've moved the mousebird consulting blog. Check out this post on <a href="https://mousebirdconsulting.netlify.app/location-tracking-android/" target="_blank">Location Tracking for Android</a>.</p>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-26683686056683091832020-12-10T10:07:00.000-08:002020-12-10T10:07:34.549-08:00An Offer to the Mobile Mapping Community<p>The short version: We're offering to fix a key problem with the open source version of the Mapbox mobile display toolkit. But it'll cost money.</p><p>To emphasize, I'm talking about the native mobile display SDK here, not the web.</p><p><br /></p><h4 style="text-align: left;">The Situation</h4><p>A lot of discussion is happening around Mapbox <a href="https://github.com/mapbox/mapbox-gl-js/blob/main/CHANGELOG.md#200">closing their Javascript API</a>. For good reason. It's the most flexible geospatial display API on the web that focuses on performance.</p><p>Less noise has been made about Mapbox doing something similar to their mobile APIs back in July. Same problem, different platform.</p><p><br /></p><h4 style="text-align: left;">Mapbox Did What Now?</h4><p>It's a little convoluted, but it goes like this. They changed the license on the mobile APIs to make it more restrictive, sure, but they also did something more worrying. They scooped out the rendering engine for Android and iOS and placed it in a binary blob. So it's no longer open source, or even visible.</p><p>Obviously that makes the SDK no longer open. In a big, big way. So you can just use the old version, right? Well, there's a wrinkle.</p><p><br /></p><h4 style="text-align: left;">Apple, OpenGL ES and Metal</h4><div><br /></div><div>The old Mapbox mobile SDKs used OpenGL ES for rendering. That's fine on Android, but Apple has deprecated OpenGL in favor of its own rendering toolkit, Metal. The how's and why's and wailing and such is for another day. They can do it. They did it. We live with it.</div><div><br /></div><div>So that's a big problem using the old (open) version of the Mapbox mobile display SDKs. You're going to fall off the cliff at some point without a Metal renderer.</div><div><br /></div><h4 style="text-align: left;">So Why Not Switch to WhirlyGlobe-Maply</h4><div><br /></div><div>Honestly, we'd prefer you just took a look at <a href="https://mousebird.github.io/WhirlyGlobe/">our toolkit</a>. It has a good open source lineage and we didn't close it when we added Metal support.</div><div><br /></div><div>But yeah, we know people will want to stick with MapboxGL, even if they can't have the new version. So what if you could drop in a new Metal renderer?</div><div><br /></div><h4 style="text-align: left;">Who Do We Know With a Metal Renderer?</h4><div><br /></div><div>Well, we have a Metal renderer in WhirlyGlobe-Maply. It's sitting there in our toolkit purring away. Tested in shipping software, uses indirect rendering, the more GPU friendly complicated option, and already rendering Mapbox Style Sheets.</div><div><br /></div><h4 style="text-align: left;">So You Just Drop It In Then?</h4><div><br /></div><div>Ever tried to drop a new engine in your car? Yeah, it's a bit more complex, but it can be done.</div><div><br /></div><div>Our low level renderer is meant for internal use. We interact with it through a set of Managers which turn things like roads into polygons and shader controls. The renderer itself has modules for OpenGL and Metal.</div><div><br /></div><div>But the good news is that low level piece (WhirlyKit, we call it) is separable. It's one nice C++ blob that could be copied into another project.</div><div><br /></div><h4 style="text-align: left;">Lawyers, Drugs & Money</h4><div><br /></div><div>I've never looked inside MapboxGL. I don't know how they implement their shaders, I don't know if they have a true rendering engine or some tile based thing. I've never looked and I wasn't planning on it.</div><div><br /></div><div>No disrespect to their work, I just manage our Intellectual Property carefully. Our solutions will look different from theirs, have a provable audit trail in git and be more likely to stand up in court.</div><div><br /></div><div>This project would pierce that veil and I'd want to have a good attorney lay out the ground rules. Good attorneys aren't cheap.</div><div><br /></div><div>And as for the engineering, this isn't a trivial task and it would require money. We already give away our toolkit for free and maintaining it uses up our "free" time. Someone needs to pay for this.</div><div><br /></div><h4 style="text-align: left;">So Maybe Someone Will Just Do This For Free?</h4><div><br /></div><div>Maybe. It's a good learning experience. But there's a reason Mapbox buried its rendering engine. Doing it is hard. Doing it well is much, much harder.</div><div><br /></div><div>Not many geospatial developers understand real time rendering. If you want to use game developers, you need to teach them geospatial. Been down that road. It's fine, but it's a long road.</div><div><br /></div><h4 style="text-align: left;">Summary</h4><div><br /></div><div>We know what we're doing here. Obviously. We could do this, replacing their OpenGL renderer with our likely faster Metal renderer. All it takes is money.</div><div><br /></div><div>I'm not delusional. A lot of things have to happen quickly. Any sufficiently large player can find another way to pressure Mapbox and probably already has. That's just business.</div><div><br /></div><div>But if you have the cash and the need, we're open to fixing this problem for the community.</div>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-8153308587213943892020-12-08T16:44:00.004-08:002020-12-08T16:54:15.740-08:00Closing of the Mapbox APIs<div style="text-align: left;">We make <a href="https://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a>, a mobile map toolkit that's open source and really fast. We'd like money to make it better.</div><p>The web? Sure, we'd love to make a Javascript/WebGL version. Pay us!</p><p>And while you're here, do you have any ideas for free marketing?</p><p><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_bNtQd75ofqaBoGt5ZTb6kKydwhYhiAd8-vwlamzW0DYhNhMLeAOWKdTsjJQrROq90WDs4Rw4k5Wld8gzew_CTHxD_YzB4a936pixlH9f0_r4hBAU82Au19zTEe4tG1CfMecx25uuPki/s2048/VectorTiles.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1283" data-original-width="2048" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_bNtQd75ofqaBoGt5ZTb6kKydwhYhiAd8-vwlamzW0DYhNhMLeAOWKdTsjJQrROq90WDs4Rw4k5Wld8gzew_CTHxD_YzB4a936pixlH9f0_r4hBAU82Au19zTEe4tG1CfMecx25uuPki/w400-h250/VectorTiles.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">MapTiler Streets in WhirlyGlobe-Maply</td></tr></tbody></table><h2 style="text-align: left;"><br />Mapbox & Competition Lost</h2><p>Let's be honest, Mapbox makes the biggest and best maps SDKs for developers. Google's map is better, but their SDK is meh. Apple Maps is pretty good in both ways. Bing is... also around. As are lots of others. But MapboxGL was always our competition.</p><p>My vector toolkit predated theirs. Really! And I had a few map app developers because of that. But when they turned on the Softbank money hose, my little toolkit never had a chance. I lost most of those customers in the ensuing years. That wasn't fun.</p><p>Lucky me, I could see it coming. I steered the company into weather and aviation. Unlike a lot of competitors, we survived.</p><p><br /></p><h2 style="text-align: left;">Closed vs. Open Source</h2><p>Mapbox has changed the license on its mobile and <a href="https://github.com/mapbox/mapbox-gl-js/blob/main/CHANGELOG.md#200">now Javascript APIs</a> to something that is not open source. Is it free? I can't really tell. But it's <a href="https://news.ycombinator.com/item?id=25347310">certainly not open</a>.</p><p>I've been expecting this for years. It's the standard Silicon Valley Venture Capital play. Make a thing cheap, destroy the competition, enjoy your market. They executed it well.</p><p>So now we're going to get all those customers back, right? Ha!</p><p><br /></p><h2 style="text-align: left;">Lock In / New Users</h2><p>The truth is those developers won't ever come back. The cost of switching is too high and they're off doing other things. Anyway, if you're using Mapbox services, it's fine. That strategy totally works.</p><p>We have picked up a few open source map extremists in recent years. They've contributed money to our Vector Tiles and Style Sheet support. It's getting really good.</p><p>So what's next?</p><p><br /></p><h2 style="text-align: left;">We Are Open Source</h2><p>Let me reiterate that the WhirlyGlobe-Maply toolkit is licensed under <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>, a very friendly license for doing all sorts of commercial work.</p><p>Open source powers our small business and we're committed to it. It's a contract between us and our community. One we've honored through several major upgrades.</p><p><br /></p><h2 style="text-align: left;">Javascript / WebGL</h2><p>And hey, we're open to making a Javascript version of the toolkit. And not just a cross-compiled version, a real SDK for JS developers.</p><p>I've actually proposed this to weather users a few times. Just the parts they need, overlaid on a web map. Not the whole thing, but the core rendering is the same.</p><p>We'd open source it, because that's who we are. If you're interested, reach out. Preferably with money.</p><p><br /></p><h2 style="text-align: left;">Marketing on the Cheap</h2><p>With less competition, you'd think we'd be set, right? Not so much. Mapbox remade the market in its image and we have to live in that world.</p><p>But there are opportunities. Projects that have to switch, projects that are just starting out, competitors who don't want to write their own. That sort of thing.</p><p>So if you have ideas for marketing to those people, I'd love to hear them. Free ideas, preferably. Because open source. </p>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-90520156528545325332020-11-10T08:31:00.001-08:002020-11-10T08:39:28.389-08:00WhirlyGlobe-Maply 3.0 Integration & HousekeepingThere are currently two github repos for WhirlyGlobe-Maply. The <a href="https://github.com/mousebird/WhirlyGlobe">main one</a> and the one for version 3.0. We're merging them. <div><br /></div><div> Version 3.0 was developed in private for sponsors and then released publicly. That caused exactly as much trouble as I expected. We did get Metal support on iOS and a really nice Android version. Worth it! <div><br /></div><h3 style="text-align: left;"> WhirlyGlobe-Maply Versions
</h3></div><div><br /></div><div>Not everyone wants to upgrade to 3.x right now, so we got you covered on 2.x.</div><div><br /></div><div>The current 2.x version is 2.6.6. The tag is v2.6.6 and you can use that directly in Cocoapods or whatever your favorite system may be. There may be additional v2.6.x versions. Just look at the tags.</div><div><br /></div><div>We're going to tag v3.0 on the main repo as well, but you probably want to use 3.1 which we'll be releasing shortly onto master and develop branches.</div><div><br /></div><div>Going forward, master will be the stable one and use develop if we tell you to (or if you're feeling daring).</div><div><br /></div><h3 style="text-align: left;">Tutorials</h3><div><br /></div><div>I almost forgot. The <a href="https://mousebird.github.io/WhirlyGlobe/tutorial/">tutorials</a> have been updated for 3.0!</div><div><br /></div><div>Android is new. Lots of stuff changed on the Android side of things. iOS has been mostly updated. If you find problems with either, let us know.</div><div><br /></div>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-21191869028514272172020-11-02T08:58:00.001-08:002020-11-02T08:58:57.021-08:00We Can Display Your Mapbox Style Map<div class="separator"></div><p>When people think of us, most think of WhirlyGlobe. It's the iconic interface in weather apps like <a href="https://darksky.net/app">DarkSky</a> and tons of aviation apps you'd only know if you're a pilot.</p><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-2XD6YsMrCOI/X6A4KBqsjRI/AAAAAAAAEjk/87HOR2Q-NNM7RAHGyFg94xxE3T-adZzkwCLcBGAsYHQ/Screen%2BShot%2B2020-11-02%2Bat%2B8.42.32%2BAM.png" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="523" data-original-width="1198" height="175" src="https://lh3.googleusercontent.com/-2XD6YsMrCOI/X6A4KBqsjRI/AAAAAAAAEjk/87HOR2Q-NNM7RAHGyFg94xxE3T-adZzkwCLcBGAsYHQ/w400-h175/Screen%2BShot%2B2020-11-02%2Bat%2B8.42.32%2BAM.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Saildrone Forecast</td></tr></tbody></table><br />But did you know we also make a good 2D slippy map? That's Maply and it's completely open source.</p><p>Our support for Mapbox style maps has gotten really good this year, but we'd like to make it better!</p><h4 style="text-align: left;">Mapbox Kinda Maps</h4><p>Vector Tiles and Mapbox Style Sheets are a potent combo and they've won the geospatial format wars. If you want to make your own vector slippy map, that's likely how you're doing it.</p><p>Maply has supported Vector Tiles for years, but the Mapbox Style Sheet support lagged.... until this year.</p><p></p><div class="separator" style="clear: both; text-align: center;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://lh3.googleusercontent.com/-ntNhXiGb33Q/X6AxRcktUPI/AAAAAAAAEjY/F38uworBUBg9L8dUBVVBQKXPdtuIPCGgACLcBGAsYHQ/VectorTiles.jpg" style="margin-left: auto; margin-right: auto;"><img data-original-height="1283" data-original-width="2048" height="200" src="https://lh3.googleusercontent.com/-ntNhXiGb33Q/X6AxRcktUPI/AAAAAAAAEjY/F38uworBUBg9L8dUBVVBQKXPdtuIPCGgACLcBGAsYHQ/w320-h200/VectorTiles.jpg" title="MapTiler Streets" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">MapTiler Streets<br /></td></tr></tbody></table></div><p></p><p>With the recent move to a unified code base we've got one single Mapbox Style Sheet implementation for iOS and Android.... and wherever else we port to. On iOS we upgraded our shaders to react to zoom level changes and it looks fantastic.</p><p>But there's a lot more to do. The spec if vast, and the fiddly bits are so very fiddly. We need money for more.</p><h4 style="text-align: left;">Who Are You Again?</h4><p>mousebird consulting is a little company that makes WhirlyGlobe-Maply. We specialize in weather, aviation, and GIS mobile app development based on the toolkit.</p><p>We've been around with this thing for nearly a decade. It actually predates most of the competition... and it really is open source.</p><h4 style="text-align: left;">How Much Money We Talking?</h4><div><br /></div><div>Mapbox Style Sheet support is vast and will absorb a lot of development money. Two platforms with two graphics APIs (Metal and OpenGL ES) make it more complex. But architecturally, things are good and money will translate directly to features.</div><div><br /></div><div>As for amounts, $150k means I can hire someone just for this. $30k means we spend a couple of sprints on new features. Obviously more is better, but even $10k would move things along.</div><div><br /></div><h4 style="text-align: left;">I Dunno, We're Kind of Invested In...</h4><div><br /></div><div>Oh, I know you are. Maybe you'll consider switching someday, but that's not what this is about. </div><div><br /></div><div>Some very large companies are committed to this technology. Toss us a little cash and we'll be there as your backup plan.</div><div><br /></div><div>And for the rest of you, our toolkit has gotten really good and we've outlived most of our competitors. We're stable and we're not going anywhere. If you're committed to open source, <a href="https://mousebird.github.io/WhirlyGlobe/">check us out</a>.</div>SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-91510005236465737512020-05-20T17:03:00.001-07:002020-05-20T17:03:20.702-07:00Elevation / Synthetic VisionI’ve never been happy with elevation support in the toolkit. With the move to 3.0 and advances in mobile hardware, we can do much better.<br />
<br />
But before I dive in, a bit about terminology. Aviation developers tend to refer to a simulated display of where a pilot is and where they're going as <i><b>Synthetic Vision</b></i>. The rest of you might just think of it as elevation support in the toolkit. It's the same thing.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-HO-r-7TdJbA/XsW8I6DXVvI/AAAAAAAAEc0/VXzB5jfmfiws3XrCg4xW8ciP3bbgk8TiACPcBGAYYCw/s1600/Ranier.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="207" data-original-width="300" src="https://1.bp.blogspot.com/-HO-r-7TdJbA/XsW8I6DXVvI/AAAAAAAAEc0/VXzB5jfmfiws3XrCg4xW8ciP3bbgk8TiACPcBGAYYCw/s1600/Ranier.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"></td><td class="tr-caption"><span style="font-size: 12.8px;">Mt. Rainier from Mapbox Satellite with elevation</span></td></tr>
</tbody></table>
<br />
I’m going to try to put together a small group of WhirlyGlobe-Maply users to sponsor a new development effort. Let’s look at what that would be.<br />
<br />
<h3>
How Loading Used to Work</h3>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-RZveHUcTmLY/XsW8ZAT1UoI/AAAAAAAAEc4/iMNStY-FLnoX-hIqAzxtmU7YxaeqI0rwQCLcBGAsYHQ/s1600/Level0.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="188" data-original-width="182" src="https://1.bp.blogspot.com/-RZveHUcTmLY/XsW8ZAT1UoI/AAAAAAAAEc4/iMNStY-FLnoX-hIqAzxtmU7YxaeqI0rwQCLcBGAsYHQ/s1600/Level0.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Level 0 loaded</td></tr>
</tbody></table>
Elevation loading was something of a hack in the toolkit. To understand why, we have to look at the way we loaded a tile’s worth of data:<br />
<blockquote class="tr_bq">
<div style="text-align: left;">
<span style="color: #0b5394;"> Can we see enough of this tile to load it?</span></div>
<div style="text-align: left;">
<span style="color: #0b5394;"> Request the imagery & wait for it to return</span></div>
<div style="text-align: left;">
<span style="color: #0b5394;"> Request the elevation & wait for it to return</span></div>
<div style="text-align: left;">
<span style="color: #0b5394;"> Build the geometry</span></div>
<div style="text-align: left;">
<span style="color: #0b5394;"> Slap them all together</span></div>
</blockquote>
The biggest problem was loading time. The visuals would get super chunky as users waited for things to load. And it was all serial. Wait for imagery, then wait for elevation. Not great.<br />
<div>
<br /></div>
<br />
<h3>
How Loading Works Now</h3>
<br />
With the move to the Sampler/Loader architecture in 3.0 things got a lot better. The tile loading process now looks like this.<br />
<span style="color: #134f5c;"> </span><span style="color: #0b5394;"> Can we see enough of this tile to load it?</span><br />
<span style="color: #0b5394;"> Rebuild the geometry immediately.</span><br />
<span style="color: #0b5394;"> Slap whatever we currently have on the tile</span><br />
<span style="color: #0b5394;"> Request the image</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-BT4NyVfOqsY/XsW9Xf0MrHI/AAAAAAAAEdQ/Y5hA10I46dsWDU29sZKvvL4os-NBpxcuACLcBGAsYHQ/s1600/Screen%2BShot%2B2020-05-20%2Bat%2B4.28.07%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="424" data-original-width="902" height="187" src="https://1.bp.blogspot.com/-BT4NyVfOqsY/XsW9Xf0MrHI/AAAAAAAAEdQ/Y5hA10I46dsWDU29sZKvvL4os-NBpxcuACLcBGAsYHQ/s400/Screen%2BShot%2B2020-05-20%2Bat%2B4.28.07%2BPM.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As new images come in, we update the connection between geometry and textures so things get sharper. Best of all, the user sees the geometry immediately. It never gets blocky. The figures above are level 0 for the Stamen Watercolor tiles (right) even though we’re at level 4 or so for the geometry (left).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-G4W65GU7McM/XsW9pYmYGbI/AAAAAAAAEdY/YNzc9YkeB2wflIuJ3KYpKv1IT0Rljh0KgCLcBGAsYHQ/s1600/saildroneForecast.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><span style="color: black;"><img border="0" data-original-height="169" data-original-width="243" src="https://1.bp.blogspot.com/-G4W65GU7McM/XsW9pYmYGbI/AAAAAAAAEdY/YNzc9YkeB2wflIuJ3KYpKv1IT0Rljh0KgCLcBGAsYHQ/s1600/saildroneForecast.jpg" /></span></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Saildrone Forecast uses a hybrid vector map on a globe</span></td></tr>
</tbody></table>
We can also do cool stuff like load a whole stack of data sources and merge them together to produce an image and maybe some vector data and the system just manages it all. And it’s smart enough to request everything it needs at once, rather than feeling its way down from the top. It’s really nice.<br />
<div>
<br /></div>
<div>
Elevation could be a simple part of that, but I had something much bigger in mind.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<h3>
How Elevation Should Work</h3>
<div>
<br /></div>
<div>
<div>
Now we’ve got a pool of imagery tiles controlled by what the system thinks is visible. It can be laggy, imagery can be missing, we can tolerate sources with varying levels. It’s much more flexible. This suggests a way forward for elevation.</div>
<div>
<br /></div>
<div>
But let’s detour briefly into how we draw stuff. This is what the geometry goes through.</div>
</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-i2KSb0O2EvQ/XsW-Zrri4MI/AAAAAAAAEdg/pddNdlh7wUMP-Li87XyugHaZzn7WxOq-ACLcBGAsYHQ/s1600/shaderDiagram.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="136" data-original-width="442" height="122" src="https://1.bp.blogspot.com/-i2KSb0O2EvQ/XsW-Zrri4MI/AAAAAAAAEdg/pddNdlh7wUMP-Li87XyugHaZzn7WxOq-ACLcBGAsYHQ/s400/shaderDiagram.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Super complex diagram of the render pipeline</td></tr>
</tbody></table>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The geometry tiles point at the best imagery tiles (or sub-sections) for their use. Imagery becomes textures in OpenGL (or Metal) and these are applied in the fragment shader stage. It’s all well greased for just this use case.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-YlHADKs13UE/XsW-nHxtUXI/AAAAAAAAEdk/nQRGkKV2oqEtp43mtkMjyIxWpstekaapQCLcBGAsYHQ/s1600/Screen%2BShot%2B2020-05-20%2Bat%2B4.32.30%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="668" data-original-width="1356" height="197" src="https://1.bp.blogspot.com/-YlHADKs13UE/XsW-nHxtUXI/AAAAAAAAEdk/nQRGkKV2oqEtp43mtkMjyIxWpstekaapQCLcBGAsYHQ/s400/Screen%2BShot%2B2020-05-20%2Bat%2B4.32.30%2BPM.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
On the left, you can see the tiles that are loaded, including level 0 and level 5(ish) for the given (white) viewing area. On the right, that’s what it looks like. <i>To capture this picture, you have to take a video of the system while you zoom out very quickly. It will catch up and delete the high res tiles very quickly.</i></div>
<div class="separator" style="clear: both;">
<i><br /></i></div>
<div class="separator" style="clear: both;">
The idea here is that geometry tiles will point at the best imagery they can find currently loaded.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
For elevation, we actually need to do the work before the fragment shader. Each piece of geometry needs to get its spatial location before it can move on to the next stage. We used to do this on the CPU, but now we could do it in a vertex shader, on the GPU.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
It’s good to do things on the GPU. Mostly. In general. But specifically, in this case. If we pick up the elevation right at the beginning of rendering, we can do a lot of interesting stuff with it.</div>
<div>
<br /></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Peu6kZotKCg/XsW-8cQeFmI/AAAAAAAAEdw/Bvohn_I_LboFzm2mLxVgJjPOPdbcGBl-ACLcBGAsYHQ/s1600/loadingDiagram.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="194" data-original-width="262" src="https://1.bp.blogspot.com/-Peu6kZotKCg/XsW-8cQeFmI/AAAAAAAAEdw/Bvohn_I_LboFzm2mLxVgJjPOPdbcGBl-ACLcBGAsYHQ/s1600/loadingDiagram.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Geometry Tile Points to Elevation and Imagery Pools</td></tr>
</tbody></table>
<div>
<div>
Each geometry tile would point to the best elevation data available to it. That might be the <i>right</i> tile or it might be a subset of a lower resolution tile. Just like with imagery.</div>
<div>
<br /></div>
<div>
Now we’d have two pools of data, one for imagery and one for elevation. They’d be loaded independently and they could be different resolutions, loaded at different rates.</div>
<div>
<br /></div>
<div>
Having the elevation living in a separate pool of data opens up another possibility: <i>We can mess with it</i>.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Elevation Overlays</h3>
<div>
<br /></div>
<div>
One big problem with synthetic vision and elevation is airports. Runways are flat(ish), but the elevation data may not be, particularly at the resolutions available. What we need is a way to flatten the elevation.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-xdbnMYi9EK0/XsW_5GGg7jI/AAAAAAAAEd8/BlpmMpy3aBUjS4aOncW-N9Klib8TSxisQCLcBGAsYHQ/s1600/elevationRunway.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="97" data-original-width="431" height="90" src="https://1.bp.blogspot.com/-xdbnMYi9EK0/XsW_5GGg7jI/AAAAAAAAEd8/BlpmMpy3aBUjS4aOncW-N9Klib8TSxisQCLcBGAsYHQ/s400/elevationRunway.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Elevation + Runway = Flattened Elevation</td></tr>
</tbody></table>
<div>
I would propose adding an overlay at a high resolution. We render the airport outlines into that overlay with a bit of a buffer and ask the geometry vertex shader to do the heavy lifting. <i>And yes, runways slope, but I’m trying to keep the explanation simple.</i></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ktMEPyDV-aY/XsXAIGHG1eI/AAAAAAAAEeA/wwz2rFc9v_MhoUco1xm1MVu0rmv734liACLcBGAsYHQ/s1600/interpolate.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="186" data-original-width="235" height="252" src="https://1.bp.blogspot.com/-ktMEPyDV-aY/XsXAIGHG1eI/AAAAAAAAEeA/wwz2rFc9v_MhoUco1xm1MVu0rmv734liACLcBGAsYHQ/s320/interpolate.jpg" width="320" /></a></div>
<div>
<div>
The geometry vertex shader would read from the regular elevation and the overlay. No overlay, it just does the regular thing. With the overlay, it has a couple options. Within the runway itself, calculate a specific elevation. In the buffer zone, interpolate between the target elevation and the elevation database. That’ll be easy on the eyes.</div>
<div>
<br /></div>
<div>
As far as data representation goes, this is wonderfully simple. Elevation data is just a set of grids, loosely corresponding to the imagery. Airports (or runways) are simple polygons. All we need is a bit of spatial information in a simple database for lookup.</div>
<div>
<br /></div>
<div>
Best of all, it’s pretty easy to update. But there are some details.</div>
</div>
<div>
<br /></div>
<h3>
Point Model Placement</h3>
<div>
<div>
<br /></div>
<div>
There are a number of objects you want to sit on the terrain. These are things like towers, poles, maybe even buildings.</div>
<div>
<br /></div>
</div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX46ouOhwdpGcHpCiK3Ba2ekxJ0DpPz-BOdelvsaO7sH_rLOID1Y0rcF18kLG4Yv4jfvlyc5Gia1m1c5JvSRs5e6YCbQmXvCAxoHc20b2N5cQDpHSLdEXYnqhIqHMJgrJvheOcMdjwd-Ip/s1600/objects.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="167" data-original-width="294" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX46ouOhwdpGcHpCiK3Ba2ekxJ0DpPz-BOdelvsaO7sH_rLOID1Y0rcF18kLG4Yv4jfvlyc5Gia1m1c5JvSRs5e6YCbQmXvCAxoHc20b2N5cQDpHSLdEXYnqhIqHMJgrJvheOcMdjwd-Ip/s400/objects.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Objects sitting on top of terrain</td></tr>
</tbody></table>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Those will also need to be tied to the elevation database and do their position lookups in a vertex shader. It’s the same process as geometry tiles for the visuals, but it’s a toolkit change and will require a bit of work.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="clear: both; text-align: left;">
3D Loading Details</h3>
</div>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLlsrG6tbZGCFqhGBQkP1pELWKNz1l9QfOGjakIGwp2gnf6ImtcvkH0b7sSK2Cpe4kiinZ7QZ5K-GJfxp732dnbBMaCNKa4icHd9bEOQMlhe9yrFgxcdRuAWtV6NVO6gaY9K_C8eMddQZF/s1600/stHelens.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="209" data-original-width="305" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLlsrG6tbZGCFqhGBQkP1pELWKNz1l9QfOGjakIGwp2gnf6ImtcvkH0b7sSK2Cpe4kiinZ7QZ5K-GJfxp732dnbBMaCNKa4icHd9bEOQMlhe9yrFgxcdRuAWtV6NVO6gaY9K_C8eMddQZF/s320/stHelens.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Tiles with St. Helens take up more screen space</td></tr>
</tbody></table>
<div>
<div>
Another problem is how we load 3D data tiles versus 2D.</div>
<div>
<br /></div>
<div>
In general, we don’t take the elevation into account when loading tiles. And because we don’t, you end up loading more than you should <i>just in case</i>.</div>
<div>
<br /></div>
<div>
Taking elevation into account requires a fair bit of feedback between the loading system and the data it’s loading. The short version is, we need the bottom and top of the tile, but we don’t have it until we’ve loaded it. Fixable, but a bit of work.</div>
</div>
<div>
<br /></div>
<h3>
Airport/Runway Generator</h3>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-7jqLi_BiwC4/XsXBFqy1D0I/AAAAAAAAEec/VLfsM72AAsUV_DyGH7h0q91OszUoVh8ggCLcBGAsYHQ/s1600/runway.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="121" data-original-width="172" height="224" src="https://1.bp.blogspot.com/-7jqLi_BiwC4/XsXBFqy1D0I/AAAAAAAAEec/VLfsM72AAsUV_DyGH7h0q91OszUoVh8ggCLcBGAsYHQ/s320/runway.jpg" width="320" /></a></div>
<div>
<div>
The toolkit has a facility for generating geometry on the fly, but it doesn’t know anything about runways.</div>
<div>
<br /></div>
<div>
I’d propose building a rudimentary runway generator based on simple data. Markers, numbers, direction, that sort of thing. It’ll likely work well enough for most use cases and provide endless opportunities for developers to improve on.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Elevation Database</h3>
<div>
<div>
<br /></div>
<div>
I’d leave the actual airport databases up to the developers. But for the elevation, there’s no reason to reinvent the wheel.</div>
<div>
<br /></div>
<div>
I propose to build a new elevation database for CONUS and possibly Alaska. Worldwide would be a possibility, but I’m guessing it’s less useful.</div>
<div>
<br /></div>
<div>
I’d use standard data sources, available for free (USGS, mostly). Resolution would be determined by available data, but probably not better than 10m and possibly as low as 30m.</div>
<div>
<br /></div>
<div>
The resulting database would be MBTiles-like Sqlite and lower resolution versions could be easily harvested. It’s pretty easy simple a handful of SQL calls.</div>
<div>
<br /></div>
<div>
I’ve done this before, so I’ll also update the open source tools I used in the past and provide instructions for doing it again.</div>
</div>
<div>
<br /></div>
<h3>
Conclusion</h3>
<div>
<br /></div>
<div>
<div>
With a good set of imagery this would look fantastic. Even without the imagery, it’ll be pretty useful. Since the data is fairly lightly processed, you’d be able to mix and match to your own requirements or what customers are willing to pay for. It’ll work paging over the network or with everything local to the device.</div>
<div>
<br /></div>
<div>
This is where I want to take elevation in WhirlyGlobe-Maply. What are <b>your</b> priorities and what requirements do <b>you</b> have? Drop me a line. And money. Money is always good.</div>
</div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-54731358786099810432020-05-20T14:24:00.001-07:002020-05-20T14:24:49.301-07:00Vector Features / Mapbox Style Sheet RoadmapMapbox Style Sheet support has been ported to Android! Look for it in 3.1.<br />
<div>
<div>
<br /></div>
<div>
But this post is really about vector features and money. Let's dive in.<br />
<div>
<br /></div>
<div>
<h3>
Vector Maps</h3>
<div>
<br /></div>
<div>
You know what vector maps are. Take some points, lines, and polygons and turn them into visual maps.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-GRM2Nu93tvw/XeWVSJt0bsI/AAAAAAAAEX4/xSoSy32UQw8MQRcBlLjuAL83qu11q7fZgCPcBGAYYCw/s1600/IMG_0114.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1086" data-original-width="1600" height="217" src="https://1.bp.blogspot.com/-GRM2Nu93tvw/XeWVSJt0bsI/AAAAAAAAEX4/xSoSy32UQw8MQRcBlLjuAL83qu11q7fZgCPcBGAYYCw/s320/IMG_0114.jpeg" width="320" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Let's start with source data which is maybe GeoPackage or ShapeFiles, sometimes Mapbox Vector Tiles or even your own weird format. Then style it. Maybe you use SLD or Mapbox's Style Spec. Some people have their own formats and a lot just do it in code. That's how you get visuals from data.</div>
<div>
<br /></div>
<div>
This requires some basic vector functionality in the WhirlyGlobe-Maply toolkit. Stuff like labels, wide lines, big polygon features, texture support. You know the drill if you're using the toolkit.</div>
<div>
<br /></div>
<div>
I'd like to make that all work better.</div>
<div>
<br /></div>
<h3>
Who This is For</h3>
<div>
<br /></div>
<div>
Are you using WG-Maply in your aviation app? Then I know you'd like better vector support. This is for you.</div>
<div>
<br /></div>
<div>
Are you using the Mapbox Styles in your map or weather app? Then this is definitely for you. All of these features will benefit the Mapbox style maps.</div>
<div>
<br /></div>
<div>
With WG-Maply 3.0 released and working, now is the time to add a whole bunch of cross-platform vector features. What follows is a menu of things that can be added to the toolkit. For money.</div>
<div>
<br /></div>
<h3>
Zoom Level</h3>
<div>
<div>
<b><i><br /></i></b></div>
<div>
<b><i>What zoom level is this</i></b> is one of the fundamental questions in laying out a flat map. Alas, our maps are not flat and it’s a much more complicated question than it seems. Check out this spherical mercator map splatted on the globe.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-dQnZ0n5IWko/XsWXiZHbPQI/AAAAAAAAEbo/1zXVoPkwDfcnxX-_4c-IF038Us6bEmCRgCLcBGAsYHQ/s1600/GlobeZoomNumbers-82.tiff" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="279" data-original-width="512" height="174" src="https://1.bp.blogspot.com/-dQnZ0n5IWko/XsWXiZHbPQI/AAAAAAAAEbo/1zXVoPkwDfcnxX-_4c-IF038Us6bEmCRgCLcBGAsYHQ/s320/GlobeZoomNumbers-82.tiff" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
What zoom level are we at? Well…. it’s complicated. That particular map might be a zoom level 6. But if we head north, without changing our elevation we’re quickly going to be at zoom level 5. Why? Because the tiles get much smaller.</div>
<div>
<br /></div>
<div>
But a lot of things depend on a continuous “zoom level”. A color might trigger at zoom 2.5. Text size might interpolate between zoom levels 1-5 continuously.</div>
<div>
<br /></div>
<div>
To fix this once and for all I’ll implement a continuous zoom level for a given data source. It’ll be an object you can pass around for reference and query yourself as needed. I’ll even smooth out the nonlinearities (with some deeply strange code it’s best not to think about).</div>
<div>
<br /></div>
<div>
With a dependable zoom level calculation we use on specific features a lot of other things get easier.</div>
</div>
</div>
</div>
</div>
<div>
<br /></div>
<h3>
Wide Vectors</h3>
<div>
<br /></div>
<div>
<div>
Wide Vectors are just linear features with width and proper junctions. We have a wide vector implementation, but it’s got problems: It’s old and leans on geometry to do things it could do in the shaders and it’s missing a bunch of features.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-WynNbtf8Mwc/XsWYG_nYXaI/AAAAAAAAEbw/3YHTdysZE-0m1X7DodUTfznGIO7R9VSIgCLcBGAsYHQ/s1600/WideLineExample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="1024" height="113" src="https://1.bp.blogspot.com/-WynNbtf8Mwc/XsWYG_nYXaI/AAAAAAAAEbw/3YHTdysZE-0m1X7DodUTfznGIO7R9VSIgCLcBGAsYHQ/s320/WideLineExample.png" width="320" /></a></div>
<span id="goog_1956564338"></span><span id="goog_1956564339"></span><br /></div>
<div>
<br /></div>
<div>
Some of the basic attributes should vary by zoom level including width, color, opacity and offset.</div>
<div>
<br /></div>
<div>
Offset is a big one we don't have now. It would let you do insets and borders around polygons. I know you aviation users want this one, because you keep asking for it.</div>
<div>
<br /></div>
<div>
All the standard junction and cap types need to be supported. We just do bevel right now.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-KDnDbjeQV9w/XsWZWhAKhwI/AAAAAAAAEcE/87F_Dr-DOLcfZAxiNi2MztPoDby1DS82QCLcBGAsYHQ/s1600/Screen%2BShot%2B2020-05-20%2Bat%2B1.54.12%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="359" data-original-width="1596" height="88" src="https://1.bp.blogspot.com/-KDnDbjeQV9w/XsWZWhAKhwI/AAAAAAAAEcE/87F_Dr-DOLcfZAxiNi2MztPoDby1DS82QCLcBGAsYHQ/s400/Screen%2BShot%2B2020-05-20%2Bat%2B1.54.12%2BPM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty">https://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty</a></td></tr>
</tbody></table>
</div>
<div>
<br />
We have some facility for dots and dashes, but those need to be updated and tested properly. Much of this logic just needs to go into a more intelligent shader.</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiiuMgD08rDF3iP_YqS4iUCJlUU4yek87W_YCYADch4xJ9VcOPLXX65LQA8CqCfqlbcE4DdaebHCeTRo8SyZogr1EfP5Wh-G14x36iHJG-VGNm5KQKLbR76DfZWrhmHeIpIkc0w91I_ljh/s1600/WideLIneSpiral.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="361" data-original-width="800" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiiuMgD08rDF3iP_YqS4iUCJlUU4yek87W_YCYADch4xJ9VcOPLXX65LQA8CqCfqlbcE4DdaebHCeTRo8SyZogr1EfP5Wh-G14x36iHJG-VGNm5KQKLbR76DfZWrhmHeIpIkc0w91I_ljh/s320/WideLIneSpiral.gif" width="320" /></a></div>
<br /></div>
</div>
<h3>
Polygons</h3>
<div>
<br /></div>
<div>
Big polygonal features mostly work just fine. All that's really missing is control of color, opacity and enabling based on zoom level.</div>
<div>
<br /></div>
<div>
Fill patterns with textures could use some work as well.</div>
<div>
<div>
<br /></div>
</div>
<h3>
Text</h3>
<div>
<br /></div>
<div>
Text support gets tricky, particular with two platforms. It does work, but we need even more. Ignoring layout for the moment there are other features we need.</div>
<div>
<br /></div>
<div>
As with lines and polygons, we should be able to vary color, opacity and size continuously on zoom level.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-SLy8qfAXHu4/XsWdZx4uHdI/AAAAAAAAEck/EcDc5XFKTU002hWKSbZ1MCAOPPMLDb_RQCLcBGAsYHQ/s1600/LabelCutout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="67" data-original-width="298" src="https://1.bp.blogspot.com/-SLy8qfAXHu4/XsWdZx4uHdI/AAAAAAAAEck/EcDc5XFKTU002hWKSbZ1MCAOPPMLDb_RQCLcBGAsYHQ/s1600/LabelCutout.png" /></a></div>
<br /></div>
<div>
Right now outlines are kind of blurry. Ignoring the low level details of why, this is fixable.</div>
<div>
<br /></div>
<div>
And here's a specific Mapbox Style Spec feature: Support for their wacky font packs. I'm not going to switch entirely over to those, but for one of their maps it would be nice to just use them.</div>
<div>
<br /></div>
<h3>
Layout</h3>
<div>
<br /></div>
<div>
Here's the really big feature for layout. Making labels follow lines. That one would be huge. It'll also be a lot of work. Again, looking at the aviation users here. I know you want this.</div>
<div>
<br />
<a href="https://1.bp.blogspot.com/-zw5Qqq-cJTk/XsWafqSKknI/AAAAAAAAEcQ/ZkTDSXC2bWk9tXIYvmqZ7pDZOgK60ucbQCLcBGAsYHQ/s1600/Screen%2BShot%2B2020-05-20%2Bat%2B1.59.24%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="254" data-original-width="382" height="212" src="https://1.bp.blogspot.com/-zw5Qqq-cJTk/XsWafqSKknI/AAAAAAAAEcQ/ZkTDSXC2bWk9tXIYvmqZ7pDZOgK60ucbQCLcBGAsYHQ/s320/Screen%2BShot%2B2020-05-20%2Bat%2B1.59.24%2BPM.png" width="320" /></a></div>
<div>
<br />
But general Mapbox Style Sheet users would like this too.<br />
<br /></div>
<h3>
Screen Objects</h3>
<div>
<br /></div>
<div>
We have markers in the toolkit and we've got text. So if you want to make a highway shield or something you can just stick one on top of the other, right?</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflmo9aY5rL3-PaMEabcUtAM_fi9jlQ3YjQ0Q3yJNvlKKgtqRVVoN0XCVBLHT3DkOU7sVJW3m5erPR7Xf1SrPPAB7Mp5hzjyCB_hGhR7ln5SDRisXgVh_sZo3p_BtPefXAVyGv3pWMUgEh/s1600/Screen+Shot+2020-05-20+at+1.59.06+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="251" data-original-width="348" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflmo9aY5rL3-PaMEabcUtAM_fi9jlQ3YjQ0Q3yJNvlKKgtqRVVoN0XCVBLHT3DkOU7sVJW3m5erPR7Xf1SrPPAB7Mp5hzjyCB_hGhR7ln5SDRisXgVh_sZo3p_BtPefXAVyGv3pWMUgEh/s320/Screen+Shot+2020-05-20+at+1.59.06+PM.png" width="320" /></a></div>
<br /></div>
<div>
Yeah, kinda. It'll work until you see those features intersecting each other and then it looks weird. This happens a lot with aviation symbols.</div>
<div>
<br /></div>
<div>
One solution is to make custom markers for everything, which people do, but it tends to get messy and complex to adjudicate.</div>
<div>
<br /></div>
<div>
Screen Objects fix that problem. You just tell the system you'd like a highway symbol overlaid with a bit of text and it'll make that happen for you. And, oh yeah, that'll work will with part of the Mapbox Style Spec.</div>
<div>
<br /></div>
<h3>
Mapbox Specific Features</h3>
<div>
<br /></div>
<div>
Up to this point we're looking at general purpose WG-Maply features. Things you can use without committing to their style spec. But there a few specifics that'd be great if you are using their style sheets.</div>
<div>
<br /></div>
<h4>
Sprite Sheets</h4>
<div>
There's some support for this in the toolkit, specifically on iOS. It just needs to be hooked up and tested properly.</div>
<div>
<br /></div>
<h4>
Mapbox Font Madness</h4>
<div>
I don't love how they implemented fonts. It seems a bit extravagant to me. But if you want it and you're willing to pay for it, then sure. It would simplify loading the standard Maptiler styles quite a lot.</div>
<div>
<br /></div>
<h4>
Layout Specifics</h4>
<div>
How they do layout and how I do layout are pretty different. There are lots of niggling little specifics in their spec that I'm likely to just ignore. If you want to get closer to pixel perfection with their maps, I'm game. You know. For money.</div>
<div>
<br /></div>
<h4>
Hillshades, Heatmaps, Fake 3D & Rasters</h4>
<div>
If you're using some of this crazy stuff in the style spec, you're probably just using MapboxGL (whatever it's called now). I have other ways of doing it which are more code based. But if you want to, then sure. Again. For money.</div>
<div>
<br /></div>
<h2>
Conclusion</h2>
<div>
<br />
Odds are you're reading this because I sent you here with the request "<i>I'd like some money to add several of these features I know you want</i>". So, you know, let's do that. There's efficiency in scale and the more time I spend on vector maps, the better they will get.<br />
<br />
For everyone else, this is where I'd like to take the vector map support in WG-Maply. Your feedback is welcome too.<br />
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-4892731038784374562019-12-02T14:56:00.001-08:002019-12-02T14:56:32.064-08:00Mapbox Style SupportHere's a short note on Mapbox Style Sheet support in 2.6.5: It's waaaay better.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-R8YOoexzrTg/XeWVHj40snI/AAAAAAAAEXg/Mmoq_R367pQlWZnFhlJY-KfD-_l1kKWmgCK4BGAYYCw/s1600/IMG_0113.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="258" src="https://2.bp.blogspot.com/-R8YOoexzrTg/XeWVHj40snI/AAAAAAAAEXg/Mmoq_R367pQlWZnFhlJY-KfD-_l1kKWmgCK4BGAYYCw/s320/IMG_0113.jpeg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MapTiler Basic</td></tr>
</tbody></table>
<br />I did some work for a client on MapTiler and Mapbox map sources. You get to benefit. Open source!<br />
<br />
<h3>
MapTiler & Mapbox</h3>
<br />
We were focused on <a href="http://maptiler.com/">Map Tiler</a> primarily, so those work best. You can find examples for their Basic, Hybrid Satellite, and Streets styles in the AutoTester app.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-GRM2Nu93tvw/XeWVSJt0bsI/AAAAAAAAEXo/7eCpSbKL3ZoUnFMaHGrHsNCvFUZGTMmUgCK4BGAYYCw/s1600/IMG_0114.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="217" src="https://4.bp.blogspot.com/-GRM2Nu93tvw/XeWVSJt0bsI/AAAAAAAAEXo/7eCpSbKL3ZoUnFMaHGrHsNCvFUZGTMmUgCK4BGAYYCw/s320/IMG_0114.jpeg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MapTiler Streets</td></tr>
</tbody></table>
<br />
As for <a href="http://mapbox.com/">Mapbox</a>, we were trying out their Satellite offerings so you'll see examples for Satellite and Hybrid Satellite. Streets will probably kind of work, but it wasn't my priority.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-tT5f2AwaNZg/XeWVYKSJ1VI/AAAAAAAAEX0/nF2ezxljTZw1C9X2tFBrw04QX6W4PlZPgCK4BGAYYCw/s1600/IMG_0112.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="208" src="https://1.bp.blogspot.com/-tT5f2AwaNZg/XeWVYKSJ1VI/AAAAAAAAEX0/nF2ezxljTZw1C9X2tFBrw04QX6W4PlZPgCK4BGAYYCw/s320/IMG_0112.jpeg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mapbox Satellite Streets</td></tr>
</tbody></table>
<br />
You'll need to add in your own Map Tiler or Mapbox tokens. I'm not that much of a sucker.<br />
<br />
<h3>
Mapbox Kinda Map</h3>
<br />
Mapbox-style maps lean more toward the web side of things: Load a lot of random junk before you're ready. That's always been hard on my users.<br />
<br />
Look for a new Swift object called MapboxKindaMap in the AutoTester app. Just copy it into your app. For various reasons it's hard to add an actual Swift module to the old version (2.6) of the toolkit.<br />
<br />
At its simplest, give the thing a URL for the style and it'll figure out the rest. Consult the MapTiler and Mapbox Test Cases for details.<br />
<br />
<h3>
Caveats</h3>
<br />
It's working fine for my client, but their needs were pretty simple. If you want highway shields and fades per zoom level and that good stuff, it's not there. I'll be bugging my users for money to add all that and make it work on Android.... soonish.<br />
<br />
MapTiler has pretty flexible usage, but Mapbox does not. So work it out with them before you ship anything.SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com3tag:blogger.com,1999:blog-2893633529075801218.post-38719177593236491522019-07-01T11:56:00.002-07:002019-07-01T12:00:17.807-07:00WhirlyGlobe-Maply 3.0 Is Feature CompleteWhirlyGlobe-Maply 3.0 is ready, it's working and you can have it in on January 1 2020!<br />
<br />
If you're a sponsor, you can have it whenever you like. That's why you're a sponsor.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ZzjOEfttm8k/XRpT_IT6RkI/AAAAAAAAESc/qWEq1dGmtoIsdjttvHg47iop23z44ZmrwCLcBGAs/s1600/launchBanner3_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="131" data-original-width="582" height="90" src="https://1.bp.blogspot.com/-ZzjOEfttm8k/XRpT_IT6RkI/AAAAAAAAESc/qWEq1dGmtoIsdjttvHg47iop23z44ZmrwCLcBGAs/s400/launchBanner3_0.png" width="400" /></a></div>
<br />
I just fixed the last missing piece which was.... the Layout Manager. It's always the Layout Manager.<br />
<br />
<h4>
What 3.0 Means To You</h4>
<div>
<br /></div>
<div>
My bigger clients paid me money for 3.0. Being completely funded from the start was nice. Really nice.</div>
<div>
<br /></div>
<div>
The point of 3.0 was Metal for iOS & a better Android version. And sure, I threw in a few minor goals of my own. I'm very pleased with the results.</div>
<div>
<br /></div>
<div>
If you're a sponsor, this means it's time to think about upgrading. The new Android version is very comfortable and the Metal support is just WOW!</div>
<div>
<br /></div>
<div>
But if you're not a sponsor, it's cool. The toolkit has a future. Use 2.6 on iOS knowing you won't fall off the OpenGL cliff. Use it on Android knowing it's going to get so much better.</div>
<div>
<br /></div>
<h4>
Performance & Optimization</h4>
<div>
<br /></div>
<div>
I like to make graphics run fast. This is all an excuse to feed my peculiar hobby. The Metal version is faster than OpenGL, but there's another level beyond.</div>
<div>
<br /></div>
<div>
So I've saved dessert for last. After I upgrade a few sponsor apps, I'm using that data to make the Metal version even better. And, okay sure, there could be some improvements on the Android side.</div>
<div>
<br /></div>
<h4>
The Island of Lost Features</h4>
<div>
<br /></div>
<div>
A few features didn't make it to 3.0, either for Android or both versions.</div>
<div>
<br /></div>
<div>
I used to have a custom <a href="https://mousebirdconsulting.blogspot.com/2016/12/part-1-existing-3d-support-in.html">LIDAR</a> format. The only people who used it don't seem to any more. I'd build this differently now, so they can stick with 2.6.</div>
<div>
<br /></div>
<div>
<a href="https://mousebirdconsulting.blogspot.com/2013/09/whirlyglobe-maply-feature-elevation.html">Elevation</a> is used by a few people, but mostly in a way that's better served by something else. So it's out for now. I'll come back in a better way, I hope.</div>
<div>
<br /></div>
<div>
A bit of the model support, like the Geometry Builder, Shape instancing, that kind of thing didn't make it to Android. Aviation apps use it, but they're not as big on Android.</div>
<div>
<br /></div>
<h4>
What's Next</h4>
<div>
<br /></div>
<div>
Most of you get 3.0 at the beginning of 2020. There's that. I'll be continuing to maintain and support 2.6 on both platforms, so don't worry.</div>
<div>
<br /></div>
<div>
I'm impressed with what I'm seeing devs doing already! You'll see some sponsor apps come out with better graphics and lower power use on iOS. On Android, you'll see more ambitious use of the toolkit.</div>
<div>
<br /></div>
<div>
<div>
Long term, I'd like to circle back and improve the 3D data support. A native implementation of <a href="https://github.com/AnalyticalGraphicsInc/3d-tiles">3D tiles</a>, for instance. But not until there's money for it. No customers, no money, not gonna do it for free.</div>
<div>
<br /></div>
</div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-19004295622199151162019-05-17T11:03:00.002-07:002019-05-17T11:03:56.634-07:00WhirlyGlobe-Maply 3.0 Status Report #4Metal development has begun!<br />
<br />
As a reminder, this is about the <a href="http://mousebirdconsulting.blogspot.com/2019/03/whirlyglobe-maply-30-status-report-2.html">WhirlyGlobe-Maply 3.0 effort</a>: A better version of Android and a port to the Metal rendering toolkit on iOS.<br />
<br />
<h4>
Quarantining OpenGL ES</h4>
<br />
WhirlyGlobe-Maply was designed around OpenGL ES. Version 1 if you can believe it! It's been upgraded since then, but OpenGL permeates its design. Like fish in a microwave.<br />
<br />
Multithreading and state management are particularly bad in OpenGL ES and my toolkit works around this in a variety of bad ways.<br />
<br />
I've just finished shoving all of this logic into its own separate modules. Twenty-something of them. The top level interface doesn't change. This was my own private pain I'm sharing with you!<br />
<br />
Very little of the system now knows about the low level rendering which leads us to the...<br />
<br />
<h4>
Journey Into Metal</h4>
<br />
Sure, it sounds like a <a href="http://www.heavymetalparkinglot.com/">Heavy Metal Parking Lot</a> sequel, but way less cool. Behold the first of the new Metal code for setting up a texture.<br />
<br />
<a href="http://3.bp.blogspot.com/-lLxCoJT6X7k/XN723fsxTRI/AAAAAAAAEQw/ssw4-Oa2daIBIQZ4vPlAoXAhXNu0chOIwCK4BGAYYCw/s1600/Screen%2BShot%2B2019-05-17%2Bat%2B10.49.05%2BAM.png" imageanchor="1"><img border="0" height="113" src="https://3.bp.blogspot.com/-lLxCoJT6X7k/XN723fsxTRI/AAAAAAAAEQw/ssw4-Oa2daIBIQZ4vPlAoXAhXNu0chOIwCK4BGAYYCw/s400/Screen%2BShot%2B2019-05-17%2Bat%2B10.49.05%2BAM.png" width="400" /></a><br />
<br />
And let's not forget the shaders. Shaders that Xcode can syntax check! And compile at compile time! [Okay, fine there's probably a way to do that with an OpenGL extension, but it's guaranteed annoying.]<br />
<br />
<a href="http://4.bp.blogspot.com/-9pCme02rzBg/XN7269a4DjI/AAAAAAAAEQ4/SITV-GtnrFgaDD3MpeUiCJXnn-1H56RZQCK4BGAYYCw/s1600/Screen%2BShot%2B2019-05-17%2Bat%2B10.48.24%2BAM.png" imageanchor="1"><img border="0" height="186" src="https://4.bp.blogspot.com/-9pCme02rzBg/XN7269a4DjI/AAAAAAAAEQ4/SITV-GtnrFgaDD3MpeUiCJXnn-1H56RZQCK4BGAYYCw/s400/Screen%2BShot%2B2019-05-17%2Bat%2B10.48.24%2BAM.png" width="400" /></a><br />
<br />
It's glorious! In a boring way! But there's a ways to go and nothing interesting to show yet.<br />
<br />
<h4>
Summary</h4>
<br />
If OpenGL development is Napoleon's Russia Campaign, Metal is like taking light rail to the mall. Which is to say it's going well and there's no reason to suspect it won't continue doing so.<br />
<br />
Ideally, I should designate 3.0 finished sometime in June. If you're a sponsor, you get it then (or now, if you're bold). For the rest of you, that means next January.<br />
<br />SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-63207885068566656252019-04-12T10:45:00.000-07:002019-04-12T10:45:00.852-07:00WhirlyGlobe-Maply 3.0 Status Report #3I'm in the middle of the 3.0 upgrade to WhirlyGlobe-Maply. As a <a href="http://mousebirdconsulting.blogspot.com/2019/03/whirlyglobe-maply-30-status-report-2.html">reminder</a>, this is bringing the Android version up to speed with iOS and then implementing Metal support for iOS. On the way, I'm cleaning up a ton of old technical debt.<br />
<br />
So where are we now?<br />
<br />
<h4>
The Android Port</h4>
<div>
<br /></div>
<div>
This month was all about Android: Start with the test cases from iOS, trim the silly or pointless ones, move the rest to Android.</div>
<div>
<br /></div>
<div>
As boring as it sounds. Let's look at a picture.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-ODv0O7Opfqs/XLDNYZebXzI/AAAAAAAAEPU/v_iPXJv1t9cUCOyosO2nfrXfxYo9N4wMgCLcBGAs/s1600/Screenshot_20190412-103801.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1125" data-original-width="1600" height="281" src="https://3.bp.blogspot.com/-ODv0O7Opfqs/XLDNYZebXzI/AAAAAAAAEPU/v_iPXJv1t9cUCOyosO2nfrXfxYo9N4wMgCLcBGAs/s400/Screenshot_20190412-103801.png" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
So yes, it's working. This is the new data logic (Sampler/Loader) and it's just a ton faster and cleaner.</div>
<div>
<br /></div>
<div>
Even though the pyramid image tile loading is what most people use, there's a lot more to the system. I'm steadily working my way through it. Behold the glory of my spreadsheet!</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-ac339_Egkhc/XLDNvSN3gCI/AAAAAAAAEPg/h55DoOQGDIE7W_whkphAyeLZne1rjnyigCLcBGAs/s1600/Screen%2BShot%2B2019-04-12%2Bat%2B10.41.05%2BAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1092" data-original-width="1516" height="287" src="https://2.bp.blogspot.com/-ac339_Egkhc/XLDNvSN3gCI/AAAAAAAAEPg/h55DoOQGDIE7W_whkphAyeLZne1rjnyigCLcBGAs/s400/Screen%2BShot%2B2019-04-12%2Bat%2B10.41.05%2BAM.png" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
The green is done, but may have a bug or two. The mustard is in process and white hasn't been addressed yet. There's about a week to go.</div>
<div>
<br /></div>
<h4>
Android Internals & Development Flow</h4>
<div>
<br /></div>
<div>
The original Android port was a janky affair. It was built using Eclipse and the last generation of Native SDK build tools. For my part the Java Native Interface logic was.... uneven.</div>
<div>
<br /></div>
<div>
Version 3.0 was an opportunity to clean all that up. The switch to Android Studio and CMake (in 2.6) was a huge improvement already.</div>
<div>
<br /></div>
<div>
It's really the debugging in Studio that makes it so much more pleasant. I can reliably set breakpoints on both Java and C++ sides. And Studio only crashes every few hours.</div>
<div>
<br /></div>
<div>
But the point of it all was a shared C++ core. After <a href="http://mousebirdconsulting.blogspot.com/2019/03/whirlyglobe-maply-30-status-report-2.html">The Port No One Wants</a>, I had that and I've been busily wiring it up on the Android side. So if you see a MapboxVectorTileParser_iOS wrapper object, you can find an equivalent MapboxVectorTileParser_Android for talking to Java. And they mostly work the same.</div>
<div>
<br /></div>
<div>
I've also simplified much of the Java/C++ interface. There are fewer Java callbacks holding fewer Java objects on the C++ side. Simple data marshaling, like conversion to arrays, is handled on the Java side. Stuff like that cuts way down on possible bugs. </div>
<div>
<br /></div>
<div>
As a result, I can debug on one platform and expect the fix to pop up on the other. Multiple times I've fixed something on Android and then verified it on iOS. That's new.</div>
<div>
<br /></div>
<h4>
Wither Kotlin</h4>
<div>
<br /></div>
<div>
Did I say Kotlin? I didn't, but sure. Am I rewriting everything in Kotlin and using the Native Kotlin transpiler to rewrite the C++ side and then using that on iOS? No. Seriously. No. Calm down.</div>
<div>
<br /></div>
<div>
I am writing new AutoTester MaplyTestCase modules in Kotlin, though. It's pretty nice!</div>
<div>
<br /></div>
<h4>
What's Next & Thanks</h4>
<div>
<br /></div>
<div>
After a round of conference & vacation, iOS Metal is up next. I'll start real development in a couple weeks and should wrap up June-ish.</div>
<div>
<br /></div>
<div>
Metal started the 3.0 effort so a big thanks to Apple for threatening to casually break everything. That kicked the party off.</div>
<div>
<br /></div>
<div>
But more seriously, a big thanks to the sponsors of the 3.0 effort. We've all worked together a while now and I appreciate your faith in me, and more importantly, your ability to pay my invoices. WhirlyGlobe-Maply 3.0 is going to do great things for your apps!</div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-67164084187933165262019-03-07T09:41:00.000-08:002019-03-07T09:41:13.809-08:00WhirlyGlobe-Maply 3.0 Status Report #2I'm two months into the 3.0 effort. It's going well!<br />
<br />
I covered all of this <a href="http://mousebirdconsulting.blogspot.com/2019/02/whirlyglobe-maply-30-status-report.html">last time</a>, but here's the plan. We have an Android version and an iOS version. The iOS version is always better and it's been hard to update the Android version. To fix this, I need a unified C++ core used on both platforms.<br />
<br />
So the first step was a separate C++ core on iOS. And it's done!<br />
<br />
<h4>
The Port No One Wants</h4>
<br />
The newly merged C++ core is the Port No One Wants on iOS. It does nothing new and it's buggy. But it's an important step on the way to a unified toolkit. And there are bug fixes from Android that can benefit iOS, even it mostly goes the other way.<br />
<br />
The big news is it works! WhirlyGlobe-Maply 3.0 for iOS is now 50% common C++ core. I was hoping for more, but damn those Mapbox style parsers are wordy. And I want to leave that in ObjC so users can modify it themselves.<br />
<br />
It wasn't all C++ core, though. I've moved the QuadPaging logic, what you use to load things other than images, over to the new Sampler/Loader architecture. Man, that fixes a lot of problems.<br />
<br />
<h4>
To Android and Beyond!</h4>
<br />
Now I'm working on the Android version. The common C++ core compiled easily and it's on to the JNI interface. If you're not familiar, this is the C++ interface to Java and it is pretty <i>"meh"</i>.<br />
<br />
I'm slogging through that logic now and it's slow going. Thankfully Android Studio has gotten better with native code. But honestly, it was a pretty low bar.<br />
<br />
The goal is feature parity between the platforms and I think we'll get pretty close.<br />
<br />
<h4>
Unwinding Technical Debt</h4>
<br />
You accrete a bunch of technical debt in 8 years (!) and now is the time to clean it up. Here's a very boring list of some of it.<br />
<br />
<ul>
<li>MaplyShader and the low level OpenGL ES programs now unified into one representation.</li>
<li>Texture loading for tiles now consolidated in one object which works in one place.</li>
<li>Elevation callbacks removed to be replaced with something more logical.</li>
<li>The entire RemoteSource infrastructure removed in favor of something simpler and more flexible. Yeah, this will cause problems. See the next section.</li>
<li>Cut the AutoTester app back to just the essentials. Much easier for users to read.</li>
<li>Got rid of the DynamicDrawableAtlas. Android never liked it.</li>
<li>Gestures now live at the Component level with no duplicates lower down.</li>
<li>ActiveModels only exist at one level in the toolkit.</li>
<li>Generators are now gone, replaced with ActiveModels where needed.</li>
<li>Component Objects are now a concept in the core toolkit, not just the high level.</li>
<li>Paging controllers handle arbitrary visual objects as well as images. Really nice for vector maps.</li>
<li>Rather than passing around View objects, we use ViewState objects. Fixes some threading problems.</li>
<li>Managers no longer being fetched by string. Not sure why I never did that.</li>
<li>More logic moved into the BaseInfo descriptors. Render target, that sort of thing.</li>
<li>Moved locking logic over to C++11 constructs. Much cleaner.</li>
<li>Passing around references to CoordSystems, fixing a few recurrent shutdown problems.</li>
<li>Moved vector subdivision logic into a unified module.</li>
</ul>
<div>
You read this far? Weirdo.</div>
<div>
<br /></div>
<div>
There was a lot of trivia to clean up in 8 years. Now it all kind of makes sense. Except OpenGL ES. I'll be reorganizing that when I get to Metal.</div>
<div>
<br /></div>
<br />
<h4>
(Not Going To) Sunset Version 2.6</h4>
<br />
I'm breaking things in Version 3.0. The new version will work better, but it won't be 100% compatible with 2.6. <br />
<br />
The big issue is the move from the QuadImages and QuadPaging layers to the new Sampler/Loader approach. I'll cover that more in its own blog post (with pictures!) but for now let's just say it's better and I'm not going to make it backward compatible.<br />
<br />
In that spirit, I'm going to continue supporting 2.6 for both iOS and Android into the future. This will include bug fixes and updates for new platform versions.<br />
<br />
<h4>
Android, Android, and more Android</h4>
<br />
The next few weeks is all about Android. I'll continue hooking up C++ through JNI to the existing Java. Then I'll start on the new interfaces and loading logic that Android never had.<br />
<br />
Lastly, it's on to testing and feature parity. I honestly forget what's in the Android version and I'm kind of excited to have a full feature spreadsheet comparing the two.<br />
<br />SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-71462630702605632582019-02-04T15:04:00.000-08:002019-02-04T15:04:15.635-08:00WhirlyGlobe-Maply 3.0 Status ReportThe 3.0 effort's been going all month. So how are things?<br />
<br />
Things are boring. Boring, but good.<br />
<br />
<h4>
Collateralized Technical Debt Obligations</h4>
<br />
The Android port of the toolkit was supposed to share C++ code with the iOS version. It never really did. This is the <i>fundamental</i> problem between iOS and Android. It hurts the Android version and it's holding back other ports.<br />
<br />
On Android we have a hard line between Java and C++ (JNI). When I ported things the first time, I made a copy for Android and then hacked as needed. Naturally, the versions diverged between platforms.<br />
<br />
I've merged the C++ cores back together and introduced that hard line between Obj-C and C++ on iOS. This should let me fix bugs for both platforms <b><i>at the same time</i></b>. I'm excited. In a boring way.<br />
<br />
<h4>
The Port No One Wants</h4>
<br />
All of this gives me an iOS version based on a solid C++ core. No new functionality, not going to be faster or slower. And it's going to have bugs for a while.<br />
<br />
Which is to say, it's not a port anyone's excited about, but it's vital. Once that's done, I get back to the good stuff.<br />
<br />
<h4>
Good Stuff Part I</h4>
<br />
Android's behind on new functionality. The whole Sample/Loader approach, which is working so well in 2.6, is only on iOS. Before I port it, I need to clean up some old things (QuadPagingLayer), remove stuff I've replaced (QuadImagesLayer) and make sure those deprecations can be supported.<br />
<br />
That's more fun than it sounds, I swear. The QuadPagingLayer is used for loading all sorts of data objects and its replacement, based on the new Sampler/Loader, will fix a host of problems.<br />
<br />
On the more exciting front, there's elevation support. It's always been a mess on iOS and never worked on Android. It'll be fun to fix that definitively.<br />
<br />
Other good stuff will follow, including but not limited to, Metal for iOS.SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-57766835860661709582019-01-11T16:14:00.003-08:002019-01-11T16:16:07.062-08:00Saildrone ForecastIs there anything cooler than shipping an app you've spent a year and a half working on?<br />
It was a rhetorical question. There is not.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEievBhkdHMQMYbcEDyyCbrfbLJLYUXW-maujkr8MMlC5koY864MqKyqsMLXiW5TaiGUcDmF39rq2eoLjcIM2_LXbTwoaWUTBqpDEXL3JyyktoKChvqFOjSHzNjb90HTwt138UCFTbh1Avhi/s1600/Web+Header.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="705" data-original-width="1600" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEievBhkdHMQMYbcEDyyCbrfbLJLYUXW-maujkr8MMlC5koY864MqKyqsMLXiW5TaiGUcDmF39rq2eoLjcIM2_LXbTwoaWUTBqpDEXL3JyyktoKChvqFOjSHzNjb90HTwt138UCFTbh1Avhi/s400/Web+Header.PNG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Saildrone Forecast</td></tr>
</tbody></table>
<br />
Hint: It's a weather app.<br />
<br />
<h4>
Saildrone Forecast</h4>
<br />
Yup, Saildrone Forecast is a weather app. Just watch the video.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/9W-wWuWGdRo/0.jpg" src="https://www.youtube.com/embed/9W-wWuWGdRo?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
Go download it. I'll wait.<br />
<br />
<h4>
Technical Bits</h4>
<br />
There's a ton of stuff in Saildrone Forecast that's unique. But there are a couple bits of interest in WhirlyGlobe-Maply itself, like the new sampler/loader architecture and offscreen render targets. Go watch the video.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Sx1dwnWIekA/0.jpg" src="https://www.youtube.com/embed/Sx1dwnWIekA?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
Could you make your own weather app out of the box now? Ha ha. Oh god no. There's so much other stuff to do. Not to mention the data. But there are cool things to do with the vector maps and render targets.<br />
<br />
<h4>
Acknowledgements</h4>
<br />
I didn't do this all alone. Heck, I didn't even write the whole app. <br />
<br />
Credit goes to <a href="http://logicalanimal.com/">Logical Animal</a> for the rest of the UI. Big thanks to the meteorology/modeling team at <a href="https://www.saildrone.com/">Saildrone</a> for the data and putting up with stupid questions. Thanks to the platform developers and ops for processing data and keeping it running. And, of course, management and finance upon whom I can bestow the greatest contracting honor: They always pay early.<br />
<br />SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-36052431277135388602018-12-19T10:31:00.000-08:002018-12-19T10:33:22.695-08:00Technical Advisory CommitteeI'm forming a technical advisory committee. We'll meet a few times and discuss the iOS Metal port and rendering architecture in the toolkit.<br />
<br />
This post is for developers I'm trying to recruit to the committee. Let's start with the basics.<br />
<br />
<h4>
What is WhirlyGlobe-Maply?</h4>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7l3KR7Yu8YQMuaRRG3GgngepBcPeSVDElIwGQ1M686MiiTH6pj6XDvmL_fZ6k3PuRzK0VbRWwPdX7kAM-Y-bb-CgTHkZx4EA-TVxJYPg3m7hkDrWosNf7Vn0etmk7pcHEQKhO3hjky7P-/s1600/natgeofull.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7l3KR7Yu8YQMuaRRG3GgngepBcPeSVDElIwGQ1M686MiiTH6pj6XDvmL_fZ6k3PuRzK0VbRWwPdX7kAM-Y-bb-CgTHkZx4EA-TVxJYPg3m7hkDrWosNf7Vn0etmk7pcHEQKhO3hjky7P-/s320/natgeofull.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">National Geographic World Atlas (RIP)</td></tr>
</tbody></table>
<a href="http://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a> is a real time geospatial display toolkit for iOS and Android. It's used in a whole <a href="http://mousebird.github.io/WhirlyGlobe/apps/apps.html">bunch of apps</a>, like FlyQ EFB and a few big weather apps like Dark Sky.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-BNUK3wAFc58/XBqMDe93_8I/AAAAAAAAELw/aZH4Tj_lmcMsPFEGTHRX0pLVEXyab33EgCK4BGAYYCw/s1600/darksky.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://1.bp.blogspot.com/-BNUK3wAFc58/XBqMDe93_8I/AAAAAAAAELw/aZH4Tj_lmcMsPFEGTHRX0pLVEXyab33EgCK4BGAYYCw/s320/darksky.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Dark Sky</td></tr>
</tbody></table>
The toolkit's been around since 2011 and it's carved out a crazy little niche in aviation and weather. It's not a wildly profitable business, but it doesn't lose money either. How many can say that?<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-2RpWWt8UQfw/XBqMfIiQbAI/AAAAAAAAEMI/q9-lWVX3RCEwi6yFY4PYf6bbNeH7teMDACK4BGAYYCw/s1600/morecastprecip.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="187" src="https://1.bp.blogspot.com/-2RpWWt8UQfw/XBqMfIiQbAI/AAAAAAAAEMI/q9-lWVX3RCEwi6yFY4PYf6bbNeH7teMDACK4BGAYYCw/s400/morecastprecip.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Morecast</td></tr>
</tbody></table>
<br />Oh, and it's open source. So that's fun.<br />
<br />
<h4>
WhirlyGlobe-Maply 3.0</h4>
<br />
The last version I shipped was 2.6 a few weeks. A huge improvement for data loading on iOS and a nice upgrade to the Android build system. I.... need to do a post on that. But no time.<br />
<br />
3.0 is the big upgrade. I'm going to add iOS Metal support, redo the rendering internals and upgrade the Android port with a better shared C++ core and newer versions of OpenGL ES.<br />
<br />
<h4>
Technical Advisory Committee</h4>
<br />
So here's the deal. I'm adding a new renderer for Metal and replumbing the internals to match. I'd really love to discuss it with a few experts along the way.<br />
<br />
This is an open source project so, you know, not a ton of resources. Here's what I'm offering:<br />
<br />
<ul>
<li>Free lunch in a pleasant conference room at my coworking space in San Francisco</li>
<li>An invitation to pontificate on real time rendering without having to do any work</li>
<li>A cool entry on your resume</li>
</ul>
<div>
<br /></div>
You do not need to know anything about geospatial or weather or aviation. I got that covered. Here's what I need from you:<br />
<br />
<ul>
<li>Work in San Francisco or nearby. No budget for travel, sorry.</li>
<li>Know something about real time rendering, iOS Metal or Android OpenGL 3.x</li>
<li>Willingness to chat about real time rendering</li>
</ul>
<div>
<br /></div>
<div>
It's your real time rendering chops I'm interested in. So game developers most welcome!</div>
<div>
<br /></div>
<div>
Contact me at sjg@mousebirdconsulting.com and we'll see if you're a good fit.</div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com1tag:blogger.com,1999:blog-2893633529075801218.post-13366459138758440502017-04-25T09:29:00.001-07:002017-04-25T09:33:11.366-07:00Data Paging LayersWe load a lot of data sources in <a href="https://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a>, usually over the network. Images are relatively easy, but how do you deal with things like vector tiles?<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-r4YtGmW3KvE/WKyGXY7ctNI/AAAAAAAADYA/GheFtRcqz0kcQZBa3qzljd32CfAwW0nCwCPcB/s1600/Screen%2BShot%2B2017-02-21%2Bat%2B10.26.13%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="160" src="https://3.bp.blogspot.com/-r4YtGmW3KvE/WKyGXY7ctNI/AAAAAAAADYA/GheFtRcqz0kcQZBa3qzljd32CfAwW0nCwCPcB/s400/Screen%2BShot%2B2017-02-21%2Bat%2B10.26.13%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ye olde vector tile example</td></tr>
</tbody></table>
<br />
That would be the job of the Paging Layer.<br />
<br />
<h4>
Quadtree Structured Data Paging</h4>
<br />
It all starts with a <a href="https://en.wikipedia.org/wiki/Quadtree">quadtree</a>, a simple enough data structure. It's here that we decide what's visible and what needs to be loaded.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Point_quadtree.svg/500px-Point_quadtree.svg.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Point_quadtree.svg/500px-Point_quadtree.svg.png" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Quadtree courtesy wikipedia</td></tr>
</tbody></table>
The quadtree for a data source can be in any <a href="http://proj4.org/">proj.4</a> supported coordinate system, but most people use <a href="https://en.wikipedia.org/wiki/Web_Mercator">Spherical Mercator</a> which is... what they use. No judgement.<br />
<br />
In deciding what to load, we start at the top node (0: 0,0), projecting a box into the view and then recursing if the box is visible. It's not all that expensive, because quadtree. But does get a bit tricky when using the globe or multiple coordinate systems.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-2kDhFMXD6ME/VAdckgM74rI/AAAAAAAAAng/0vbh55AemDkQH7uAA7ljh_ZIDkMXXO-6ACPcB/s1600/GlobeZoomNumbers.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="174" src="https://4.bp.blogspot.com/-2kDhFMXD6ME/VAdckgM74rI/AAAAAAAAAng/0vbh55AemDkQH7uAA7ljh_ZIDkMXXO-6ACPcB/s320/GlobeZoomNumbers.gif" width="320" /></a></div>
<br />
<br />
For image layers, the toolkit has its own complex logic for loading image tiles and frames and handling failure and so on. We provide similar logic for vector tiles, but for anything else, the logic is you.<br />
<br />
<h4>
Quad Paging Layer</h4>
<br />
You've got a data source, <a href="https://en.wikipedia.org/wiki/SQLite">sqlite</a> file full of points, let's say. You want to turn them into markers, but there's too many to load at once.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-T7xs6il4DzU/Vs-OlXZ1c5I/AAAAAAAABFg/eYQyUmG7rLkUFCWYZ_0oztAkt9cqG2tNgCPcB/s1600/ClusterCompare.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="165" src="https://4.bp.blogspot.com/-T7xs6il4DzU/Vs-OlXZ1c5I/AAAAAAAABFg/eYQyUmG7rLkUFCWYZ_0oztAkt9cqG2tNgCPcB/s320/ClusterCompare.jpg" width="320" /></a></div>
<br />
<br />
Here's where the <i>QuadPagingLayer</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/android_2_5/com/mousebird/maply/QuadPagingLayer.html">Android</a>) or <i>MaplyQuadPagingLayer</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/ios_2_5/Classes/MaplyQuadPagingLayer.html">iOS</a>) comes in. Set up one of these babies with the coordinate system and extents of your data source and it'll figure out what to load.<br />
<br />
You have to create the visible objects and that's where the <i>PagingInterface</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/android_2_5/com/mousebird/maply/QuadPagingLayer.PagingInterface.html">Android</a>) and <i>MaplyPagingDelegate</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/ios_2_5/Protocols/MaplyPagingDelegate.html">iOS</a>) come in. The paging layer calls you back when it's time to load a tile's worth of data.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="https://1.bp.blogspot.com/-AZCIFboUH-c/WP932_TWbzI/AAAAAAAAD4c/kC5nxOtpCJwy-zZ7KqqCQ4yE9aTKGQnsgCLcB/s1600/HelensCrop.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="170" src="https://1.bp.blogspot.com/-AZCIFboUH-c/WP932_TWbzI/AAAAAAAAD4c/kC5nxOtpCJwy-zZ7KqqCQ4yE9aTKGQnsgCLcB/s400/HelensCrop.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;">Mt. St. Helens LIDAR</td></tr>
</tbody></table>
We love our threading in WhirlyGlobe-Maply and it was ever so hard to implement. So use it. Try a <a href="https://developer.apple.com/library/content/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html">dispatch queue</a> on iOS or use a <a href="https://mousebird.github.io/WhirlyGlobe/reference/android_2_5/com/mousebird/maply/MaplyBaseController.html#getWorkingThread--">worker thread</a> on Android. But don't hold up the paging layer. It has other things to do.<br />
<br />
When you make a visible object (marker, label, etc) tell the paging layer what you created with the <i>addData</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/ios_2_5/Classes/MaplyQuadPagingLayer.html#/c:objc(cs)MaplyQuadPagingLayer(im)addData:forTile:">iOS</a>, <a href="https://mousebird.github.io/WhirlyGlobe/reference/android_2_5/com/mousebird/maply/QuadPagingLayer.html#addData-com.mousebird.maply.ComponentObject-com.mousebird.maply.MaplyTileID-">Android</a>) method and call <i>tileDidLoad</i> (<a href="https://mousebird.github.io/WhirlyGlobe/reference/android_2_5/com/mousebird/maply/QuadPagingLayer.html#tileDidLoad-com.mousebird.maply.MaplyTileID-">Android</a>, <a href="https://mousebird.github.io/WhirlyGlobe/reference/ios_2_5/Classes/MaplyQuadPagingLayer.html#/c:objc(cs)MaplyQuadPagingLayer(im)tileDidLoad:">iOS</a>) when you're finished.<br />
<br />
That's enough information for the paging layer to do the rest, which includes...<br />
<br />
<h4>
Cleanup on Node (12: 129,1304)</h4>
<br />
One of the trickier bits here is deciding when to delete something. Luckily, you don't have to.<br />
<br />
You told the paging layer what you created and it'll delete it for you. There's even a callback if you really, really want to know it did that.<br />
<br />
<h4>
Paging Layers are Awesome</h4>
<br />
There it is, one of the key pieces of WhirlyGlobe-Maply: the paging layer. We use it all over the place and if we don't support your data type, you'll use it too.<br />
<br />SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-986502267100258952017-02-21T10:45:00.000-08:002017-02-21T10:46:28.778-08:00Styled Layer Descriptor and Metro ExtractsIn <a href="https://mousebirdconsulting.blogspot.com/2017/02/whirlyglobe-maply-25-release.html">WhirlyGlobe-Maply 2.5</a> we added support for the Styled Layer Descriptor format. We also added an example in the AutoTester and a tutorial.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-r4YtGmW3KvE/WKyGXY7ctNI/AAAAAAAADX0/MUriXPBFho8c9KH5-Wy2XrNfPeX_BUTBgCLcB/s1600/Screen%2BShot%2B2017-02-21%2Bat%2B10.26.13%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="160" src="https://1.bp.blogspot.com/-r4YtGmW3KvE/WKyGXY7ctNI/AAAAAAAADX0/MUriXPBFho8c9KH5-Wy2XrNfPeX_BUTBgCLcB/s400/Screen%2BShot%2B2017-02-21%2Bat%2B10.26.13%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Belfast, it seems.</td></tr>
</tbody></table>
<br />
Let's start with the data.<br />
<br />
<h3>
Metro Extracts</h3>
<div>
<br /></div>
<div>
Mapzen provides <a href="https://mapzen.com/data/metro-extracts/metro/belfast_ireland/">regular extracts</a> of OpenStreetMap data. These are available in a variety of formats; useful if you just want a little OSM data.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-LRqOXjM2YKI/WKyFiSdTOtI/AAAAAAAADXs/m0-wfZ4D6hs_oQYRLF_18FCEGZvCM6dkgCLcB/s1600/Screen%2BShot%2B2017-02-21%2Bat%2B10.21.45%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="133" src="https://2.bp.blogspot.com/-LRqOXjM2YKI/WKyFiSdTOtI/AAAAAAAADXs/m0-wfZ4D6hs_oQYRLF_18FCEGZvCM6dkgCLcB/s400/Screen%2BShot%2B2017-02-21%2Bat%2B10.21.45%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Courtesy Mapzen</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
We chose Belfast in GeoJSON for our own example. This is just data, though, so how do we make it visual?</div>
<div>
<br /></div>
<h3>
Styled Layer Descriptor</h3>
<div>
<br /></div>
<div>
The <a href="http://www.opengeospatial.org/standards/sld">Styled Layer Descriptor</a> format is an OGC standard used to style data into map images. It's a bit crusty but, you know, standard. We edit it in QGIS and export it for use in our toolkit.</div>
<div>
<br /></div>
<script src="https://gist.github.com/mousebird/567ff4d8d5bf01502177a1cc4a944d80.js"></script>
<div>
<br /></div>
<div>
<br /></div>
<div>
WhirlyGlobe-Maply reads SLD and uses it to style Shapefiles, GeoJSON, or Mapbox Vector Tiles. Any vector data, basically. So let's put it all together.</div>
<div>
<br /></div>
<h3>
Example & Tutorial</h3>
<div>
<br /></div>
<div>
Rather than blather about it here, we put a nice example in the <a href="https://github.com/mousebird/WhirlyGlobe/blob/master/WhirlyGlobeSrc/AutoTester/AutoTester/testCases/GeoJSONStyleTestCase.swift">AutoTester app</a> for iOS. In Swift!</div>
<div>
<br /></div>
<div>
Ranen put together a <a href="https://mousebird.github.io/WhirlyGlobe/tutorial/ios/styled_geojson.html">tutorial</a> that walks you through the process. You can start with a Metro Extract and modify the SLD styles to your heart's content.</div>
<div>
<br />
<h3>
Up Next</h3>
<br />
We're picking up SLD users for the toolkit at a steady clip. There's a lot more to SLD we could support, so let us know how you like it.<br />
<br />
We'd also like to circle back and improve the <a href="https://mousebirdconsulting.blogspot.com/2016/11/the-return-of-mapbox-streets.html">Mapbox GL Style Sheet</a> support and implement <a href="https://mousebirdconsulting.blogspot.com/2016/09/mapzen-vector-tile-service.html">Mapzen's Tangram</a> format. But we need customers for those. Speak up if you're interested.<br />
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-84250843799599363782017-02-02T10:45:00.002-08:002017-02-02T10:49:11.057-08:00WhirlyGlobe-Maply 2.5 ReleaseVersion 2.5 is out for both iOS and Android.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-skE0wVBy690/WJN80GHdfwI/AAAAAAAADSs/Td0fsWrasJUPRLXbb-u6ykTchNQSBRkPwCLcB/s1600/MyLocation2.gif" imageanchor="1"><img border="0" height="219" src="https://3.bp.blogspot.com/-skE0wVBy690/WJN80GHdfwI/AAAAAAAADSs/Td0fsWrasJUPRLXbb-u6ykTchNQSBRkPwCLcB/s400/MyLocation2.gif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Location Tracking</td></tr>
</tbody></table>
<br />
You can get v2.5 off of the <a href="https://mousebird.github.io/WhirlyGlobe/builds/builds.html">build page</a> or from the <a href="https://github.com/mousebird/WhirlyGlobe">master branch</a>. We'll update the master Podspec for Cocoapods soonish.<br />
<br />
<div>
As usual, getting this version out the door took way too long. But here it is and it's really good.</div>
<div>
<br /></div>
<div>
<h4>
Big Changes in Version 2.5</h4>
</div>
<div>
<br /></div>
<div>
<div>
Android. Without a doubt. We now have a good Android version with a bunch of <a href="https://mousebird.github.io/WhirlyGlobe/apps/apps.html">deployed Android apps</a>. Millions of people are using <a href="https://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a> on Android. Crazy, right?</div>
</div>
<div>
<br /></div>
<div>
We started doing <a href="https://mousebird.github.io/WhirlyGlobe/builds/builds.html">automated builds</a>. I can't over stress how useful those have been.</div>
<div>
<br /></div>
<div>
Both iOS and Android have AutoTester apps; individual test cases presented in a list format. Useful both for testing and user examples.</div>
<div>
<br /></div>
<div>
We upgraded to Swift 3.0 and kept pace with all the new Xcode versions and UIKit deprecations.</div>
<div>
<br /></div>
<div>
Ripped out AFNetworking and Boost. Respect to both packages, but AFNetworking was interfering with users' own version and we eliminated Boost with C++11.</div>
<div>
<br /></div>
<div>
Vector (tiled and not) support got fancier with Styled Layer Descriptor format and the Simple Styles approach for building your own.</div>
<div>
<br /></div>
<div>
True 3D interaction got fancier in support of LIDAR. There's an example in the AutoTester so check it out.</div>
<div>
<br /></div>
<div>
We added user location tracking and display. A relatively simple change, but a popular one for map users.</div>
<div>
<br /></div>
<h4>
Important but Boring Stuff</h4>
<div>
<br /></div>
<div>
We made an enormous number of small fixes, efficiency improvements and minor functionality tweaks. Also a lot of new tests for things that are (no longer) broken. Here's a partial list in a boring format no one is going to look at.</div>
<div>
<br /></div>
<div>
Maps now have ViewState animations like the globe. Feature selection is smarter with individual and group features. Widened vectors is faster, smaller, and better. We've got a 3D model builder for things like airstrips. Elevation support is better and more flexible. Stars and atmosphere work better. Vector tiles kept up with new versions and added more style options. Particle systems work better. Internal coordinates are now double everywhere for getting really close to things. 3D support includes the ability to "grab" objects via the IntersectionManager. Removed Mapbox GL Style Sheet support and then put it back. Single level loading works on the globe now for both vector and image layers. Screen Label layout works correctly for all modes. Great circles work in 2D across the date line. And much, much more.</div>
<div>
<br /></div>
<h4>
What's Next</h4>
<div>
<br /></div>
<div>
We're going to make some internal changes to the source tree, like unify the Android and iOS branches. Then we'll move to git-flow methodology to hopefully speed up minor releases.</div>
<div>
<br /></div>
<div>
In terms of functionality, I've been rolling out statements of intent for things like <a href="https://mousebirdconsulting.blogspot.com/2017/01/windows-really.html">Windows</a>, <a href="https://mousebirdconsulting.blogspot.com/2016/12/part-1-existing-3d-support-in.html">True</a> <a href="https://mousebirdconsulting.blogspot.com/2017/01/part-2-future-3d-support-in-whirlyglobe.html">3D</a> support, <a href="https://mousebirdconsulting.blogspot.com/2016/09/mapkit-compatibility-roadmap.html">MapKit</a>, and <a href="https://mousebirdconsulting.blogspot.com/2016/11/the-return-of-mapbox-streets.html">Mapbox</a> support. We've also got the <a href="https://mousebird.github.io/mousebird/imagerypro.html">Imagery Pro</a> toolkit for weather apps and another one in the pipeline. Much of this requires money, so let me know if you have some.</div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-85777440165495376292017-01-23T10:46:00.000-08:002017-01-23T10:48:43.831-08:00Windows? Really?We recently put together an estimate for a Windows 10 port. And you may be thinking to yourself... WHY?<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-MoiHAm16xHc/WIZJL5ITzfI/AAAAAAAADM0/dr785nzpy3wHu9iq2XULl--rfLD9KrStQCLcB/s1600/en-INTL-XL-Surface-Pro4-Refresh-CoreM-SU3-00001-mnco.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="225" src="https://1.bp.blogspot.com/-MoiHAm16xHc/WIZJL5ITzfI/AAAAAAAADM0/dr785nzpy3wHu9iq2XULl--rfLD9KrStQCLcB/s400/en-INTL-XL-Surface-Pro4-Refresh-CoreM-SU3-00001-mnco.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The Surface Pro 4? Maybe? Dunno. Sure looks cool.</td></tr>
</tbody></table>
<br />
<br />
It's not the phone. Oh my no, not the phone. It's about the Surface.<br />
<br />
<h4>
Delicious Schadenfreude</h4>
<div>
<br /></div>
<div>
If you were working during the 90's or early 00's Microsoft's diminished circumstances are amusing. Unless you work for Microsoft, I guess. I made a living writing Windows software back then and I loved the development environment.</div>
<div>
<br /></div>
<div>
But watching Microsoft face plant in the mobile market has been glorious. Truly. Undeniably. Glorious.</div>
<div>
<br /></div>
<h4>
Back to the Point</h4>
<div>
<br /></div>
<div>
Ignoring the Windows Phone (<i>and who doesn't?</i>). Okay, okay, no more cheap shots.</div>
<div>
<br /></div>
<div>
Ignoring the Windows Phone, the Surface is kind of cool. MS has typically muddled the lineup and the naming, but it's settled down to a beefy line of devices running Windows 10.</div>
<div>
<br /></div>
<div>
Now that the WhirlyGlobe-Maply Android version is solid, we can start thinking about another port. How hard would Windows be?</div>
<div>
<br /></div>
<h4>
Porting to Windows 10</h4>
<div>
<br /></div>
<div>
First, a quick review of the Android port. WhirlyGlobe-Maply has a chewy C++ core which we ported over and then coated in a Java shell. All the rendering and data management is in C++. The networking, threading, and interface is in Java. It was painful, but the results are fast and easy to use.</div>
<div>
<br /></div>
<div>
On Windows, we'd follow a similar path. The C++ core goes first, then a C# interface on top. Interfacing C++ to C# is easier than the NDK on Java (it's a low bar). That just leaves the graphics API.</div>
<div>
<br /></div>
<div>
We use OpenGL ES on Android and iOS, but Windows uses DirectX. Google makes the <a href="https://en.wikipedia.org/wiki/ANGLE_(software)">ANGLE library</a> which should do the trick. If not, we'll have to fall back to new shaders and new graphics code.</div>
<div>
<br /></div>
<h4>
Who Wants This?</h4>
<div>
<br />
Microsoft is really good at selling Surfaces to big companies. Airlines and aircraft manufacturers are big companies. A lot of our customers are in those industries. Connect the dots.</div>
<div>
<br /></div>
<div>
This is by no means a sure thing. We've worked up the estimate and sent it out to a few people, but it's not cheap. Consider this notice that we're willing to do a Windows port if you've got the cash.</div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-68165217242205139462017-01-19T12:59:00.001-08:002017-01-19T13:01:20.696-08:00CartoType GL<div class="p1">
CartoType GL is the turbo-charged upgrade to the <a href="http://www.cartotype.com/">CartoType</a> library. We took the super fast mobile rendering from Maply and stitched it into the CartoType renderer. </div>
<div class="p2">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-GU14FwVPmt4/WIEolZjWMvI/AAAAAAAADME/OV5GqFoYeFUA0NyncfbPf42dXzGmewzmgCLcB/s1600/LondonCloseup.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="135" src="https://3.bp.blogspot.com/-GU14FwVPmt4/WIEolZjWMvI/AAAAAAAADME/OV5GqFoYeFUA0NyncfbPf42dXzGmewzmgCLcB/s400/LondonCloseup.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Closeup from London app</td></tr>
</tbody></table>
<div class="p1">
<br />
You can use the CartoType data formats, styling sheets and conversion tools, but get ultra-fast OpenGL ES rendering on mobile devices. Why would you want that? Well, CartoType is incredibly good at offline map display and routing. Yes, offline routing. And it’s really compact.</div>
<div class="p2">
<br /></div>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
</style>
<br />
<div class="p1">
We announced this one a while ago and now it’s close to release! First up is the iOS version, available very, very soon. Then we’ll do Android and then the other platforms. Contact <a href="mailto:sales@cartotype.com">sales@cartotype.com</a> if you’re interested.</div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-84202444740234612862017-01-05T11:40:00.002-08:002017-01-05T11:42:09.669-08:00Part 2: Future 3D Support in WhirlyGlobe-MaplyLast time we looked at WhirlyGlobe-Maply's <a href="https://mousebirdconsulting.blogspot.com/2016/12/part-1-existing-3d-support-in.html">existing 3D support</a>. It's considerable, but often hard to use.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-FAULQe2lQ7w/WG6bcgfpriI/AAAAAAAADDY/nJAi4Hw0F3k0sZsCzXMzenzQwGUmEhMGgCLcB/s1600/3DCombo.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="123" src="https://1.bp.blogspot.com/-FAULQe2lQ7w/WG6bcgfpriI/AAAAAAAADDY/nJAi4Hw0F3k0sZsCzXMzenzQwGUmEhMGgCLcB/s400/3DCombo.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FlyQ EFB and NATS Airspace Explorer</td></tr>
</tbody></table>
<br />
Now we'll talk about where we're heading. It's all about the data sources.<br />
<br />
<h4>
Putting the 3D's in Data</h4>
<br />
Most of our users have fairly limited data processing capabilities. Say you want to add elevation to an app. We'd say:<br />
<br />
<ul>
<li>Gather all the elevation data you need. USGS is a good source.</li>
<li>Stitch it all into a single giant image in Spherical Mercator</li>
<li>Chop that image up into tiles using this random tool we have on github</li>
<li>Load the resulting sqlite file onto the device.</li>
</ul>
<div>
<br /></div>
<div>
Easy enough, right?</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihy4l4j8-95YvCmj8NEyr7BT4_b5xuA5bK7rr3oUTUek85PXnLmiWrxUYXcDjzsXgZs_xs3SIKTtx_r2bqC4i0gKtPo7IksSqz2aAfI4RZ8o5f6VF15YqiUIG_tKODvx3qvBRI5E_viuEU/s1600/CesiumTerrainWeb.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihy4l4j8-95YvCmj8NEyr7BT4_b5xuA5bK7rr3oUTUek85PXnLmiWrxUYXcDjzsXgZs_xs3SIKTtx_r2bqC4i0gKtPo7IksSqz2aAfI4RZ8o5f6VF15YqiUIG_tKODvx3qvBRI5E_viuEU/s400/CesiumTerrainWeb.jpg" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<div>
Yeah, not so much. That's why you see so few WG-Maply apps with elevation.</div>
<div>
<br /></div>
<div>
It's not just us, you know. OpenStreetMap data is much easier to use when you move from <a href="https://wiki.openstreetmap.org/wiki/Planet.osm">Planet Files</a> to <a href="https://mapzen.com/data/metro-extracts/">Metro Extracts</a> and <a href="https://www.mapbox.com/vector-tiles/">Vector Tiles</a>.</div>
<div>
<br /></div>
<br />
<h4>
Structured 3D Data Sources</h4>
<div>
<br /></div>
<div>
What developers really want is web services that they can plug into their apps. Also pizza that lifts itself into your mouth. Pizza robot. Patent pending.</div>
<div>
<br /></div>
<div>
People want to point their app at an elevation, 3D building, or vector tile service and stuff just happens. So let's look at some of those services and the formats they support.</div>
<div>
<br /></div>
<h4>
Two New Styles of Elevation</h4>
<div>
<br /></div>
<div>
Elevation tiles are an obvious thing. We already support Cesium's elevation, but there are others out there now.</div>
<div>
<br /></div>
<div>
Mapzen came out with a straight up <a href="https://mapzen.com/blog/terrain-tile-service/">elevation tile service</a> a few months ago. There are a few minor technical hurdles, but it could be made to work well with the toolkit.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1SNbGZK5AqZEwnOPCls22uSY4gL4HOM4_qRswcSLGrRwtSBBBmjVtZe9GXR6_Fk5ZCXxwJ5zi2QTN7zu28L20RhpLoiX7pV-X7Nq_gIJdj6QapdlManBaKJhiTQAq0cILrfpByjUOkXAo/s1600/Screen+Shot+2017-01-05+at+11.18.09+AM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1SNbGZK5AqZEwnOPCls22uSY4gL4HOM4_qRswcSLGrRwtSBBBmjVtZe9GXR6_Fk5ZCXxwJ5zi2QTN7zu28L20RhpLoiX7pV-X7Nq_gIJdj6QapdlManBaKJhiTQAq0cILrfpByjUOkXAo/s400/Screen+Shot+2017-01-05+at+11.18.09+AM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mapzen Elevation Example</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
Mapbox came out with their own <a href="https://www.mapbox.com/blog/terrain-rgb/">elevation tile service</a> shortly thereafter. It's a different approach, with similar problems in 3D but could also be made to work.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-p_MtYZZBHxc/WG6cX4aNMeI/AAAAAAAADDo/kXKNlyTvZFUYNmwF0Q-4V2NMU76-ef-OgCLcB/s1600/MapboxElevation.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="125" src="https://4.bp.blogspot.com/-p_MtYZZBHxc/WG6cX4aNMeI/AAAAAAAADDo/kXKNlyTvZFUYNmwF0Q-4V2NMU76-ef-OgCLcB/s400/MapboxElevation.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Courtesy Mapbox terrain-rgb post</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
So there you go. We'd like to support Mapzen & Mapbox elevation data for 3D.</div>
<div>
<br /></div>
<h4>
Buildings with Height</h4>
<div>
<br /></div>
<div>
OpenStreetMap buildings have height (usually, mostly). Mapbox has been showing this off lately in their APIs and Mapzen has been doing it for a while in Tangram.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-36DUcX8LCfI/WG6dfsiOT8I/AAAAAAAADD4/6fCxvulGBq0Wkudt_l1ISJjVcR7JYDlLgCLcB/s1600/Screen%2BShot%2B2017-01-05%2Bat%2B11.24.34%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="226" src="https://4.bp.blogspot.com/-36DUcX8LCfI/WG6dfsiOT8I/AAAAAAAADD4/6fCxvulGBq0Wkudt_l1ISJjVcR7JYDlLgCLcB/s400/Screen%2BShot%2B2017-01-05%2Bat%2B11.24.34%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mapbox Data w/ Mapbox GL</td></tr>
</tbody></table>
<div>
<br />We'd like to support height in vector tile data. Not too difficult, obviously, but cool.</div>
<div>
<br /></div>
<div>
Now for the harder stuff. Let's start with a detour into data formats.</div>
<div>
<br /></div>
<h4>
GL Transmission Format (glTF)</h4>
<div>
<br /></div>
<div>
The 3D file format we support right now, Wavefront OBJ, is old and weird. We need to move to something new and... less weird.</div>
<div>
<br /></div>
<div>
glTF is backed by the <a href="https://www.khronos.org/">Khronos Group</a> with lots of work from the <a href="https://cesiumjs.org/">Cesium</a> folks. It's a new, relatively simple optimized model transmission format. Easy to read, fast to transmit, it solves a lot of problems for models like these.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3BE3T27aDusLfXpypr05oz3EmsbLbfq_zL9iPN8Ck-HfDDhzBSgA6nr0bLXfYRMJOLUfHT504JF7Xrh0f965Efkv9eXUnkKrNzX8p4F3pa5OkgzA0_o_7zUSwnJ0PXYveT518oHBhPyRd/s1600/web_plane.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3BE3T27aDusLfXpypr05oz3EmsbLbfq_zL9iPN8Ck-HfDDhzBSgA6nr0bLXfYRMJOLUfHT504JF7Xrh0f965Efkv9eXUnkKrNzX8p4F3pa5OkgzA0_o_7zUSwnJ0PXYveT518oHBhPyRd/s320/web_plane.jpg" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
And it enables some even crazier stuff.</div>
<div>
<br /></div>
<h4>
3D Tiles</h4>
<div>
<br /></div>
<div>
The Cesium folks have a <a href="https://cesiumjs.org/2015/08/10/introducing-3d-tiles/">3D Tiles proposal</a> out that looks great. It's open, they've got example implementations, and they're trying to make it an <a href="https://cesiumjs.org/2016/09/06/3D-Tiles-and-the-OGC/">OGC standard</a>.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-XizY5tHNyP0/WG6eDUWHvII/AAAAAAAADEA/PDpLQQ9jdr8CEBarCbiSeRst5OZ7jyCMACLcB/s1600/Screen%2BShot%2B2017-01-05%2Bat%2B11.26.56%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="227" src="https://1.bp.blogspot.com/-XizY5tHNyP0/WG6eDUWHvII/AAAAAAAADEA/PDpLQQ9jdr8CEBarCbiSeRst5OZ7jyCMACLcB/s400/Screen%2BShot%2B2017-01-05%2Bat%2B11.26.56%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">3D Tile data displayed with CesiumJS</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
That approach is well suited for mobile. We can't display as much as a desktop can, but we can display a lot.</div>
<div>
<br /></div>
<div>
Naturally, we'd love to support this in WhirlyGlobe-Maply.</div>
<div>
<br /></div>
<h4>
Point Clouds</h4>
<div>
<br /></div>
<div>
We already support point cloud display for things like LIDAR. It's restricted to a Sqlite based format read on the device. Hey, it's what the customer needed at the time.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-9N8R0-8ARYI/WG6erFZyfOI/AAAAAAAADEI/mk8J5OBaPvAExFwna70VisLEd5p6senQgCLcB/s1600/SanSimeonFacebook1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="210" src="https://2.bp.blogspot.com/-9N8R0-8ARYI/WG6erFZyfOI/AAAAAAAADEI/mk8J5OBaPvAExFwna70VisLEd5p6senQgCLcB/s400/SanSimeonFacebook1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">San Simeon LIDAR</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
We'd love to extend this to services like <a href="https://github.com/hobu/greyhound">Greyhound</a>, an open source streaming data server. We'd also like to add support for the <a href="http://www.slideshare.net/mpgx/geo-package-pointclouds">GeoPackage point cloud</a> extension.</div>
<div>
<br /></div>
<h4>
Summary</h4>
<div>
<br /></div>
<div>
There's a ton of explicit 3D support in WhirlyGlobe-Maply for interaction, model construction, and motion. We'll continue to push in these areas and others we haven't talked about, like 3D weather. But that stuff is driven by high end client needs.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-RR_h2_-Ggzs/WG6fj_jFazI/AAAAAAAADEc/mRuv-MbumsAkuJYJtr47BR1k2-MFuMM5QCLcB/s1600/HeathrowStacks.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="208" src="https://4.bp.blogspot.com/-RR_h2_-Ggzs/WG6fj_jFazI/AAAAAAAADEc/mRuv-MbumsAkuJYJtr47BR1k2-MFuMM5QCLcB/s400/HeathrowStacks.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">NATS Airspace Explorer</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
What we'd really like to do is support these newer services for our regular users. If you have other services you'd like to see or, better yet, some budget, please let us know.</div>
<div>
<br /></div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-82417029576123572072016-12-05T11:13:00.000-08:002016-12-05T11:14:36.759-08:00Part 1: Existing 3D Support in WhirlyGlobe-MaplyWe've got a two parter for you. First up we'll look at the existing 3D support in WhirlyGlobe-Maply. Next time we'll lay out the roadmap for 3D in the future.<br />
<br />
So let's start with the question: Isn't WhirlyGlobe-Maply already 3D?<br />
<br />
<h4>
3D Minus 1D Equals 2D</h4>
<br />
<div>
Everything WhirlyGlobe-Maply does is 3D, but we hide it most of the time. Look at some of the more prominent apps, even ones that use the globe.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-9htq8uqo1OU/WEW3O2q4YCI/AAAAAAAACwo/9qz1m49RcywQ4DOOrTjxa0-bkH96GMbEgCLcB/s1600/TriPicture.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="138" src="https://3.bp.blogspot.com/-9htq8uqo1OU/WEW3O2q4YCI/AAAAAAAACwo/9qz1m49RcywQ4DOOrTjxa0-bkH96GMbEgCLcB/s400/TriPicture.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Dark Sky, Gaia GPS, NatGeo World Atlas</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
The giveaway is the gestures. Can you tilt? Nope. And we're not hiding some wealth of information. If you did tilt toward the horizon you'd see.... nothing much.</div>
<div>
<br /></div>
<div>
To be truly 3D an app needs to turn on the 3D gestures and it needs data with real 3D structure. There are a few that do it and we provide a lot of functionality to support them.</div>
<div>
<br /></div>
<h4>
LIDAR Point Clouds</h4>
<div>
<br /></div>
<div>
Did you know WhirlyGlobe-Maply supports LIDAR in a pageable sqlite format? It does and it's pretty cool.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/0fTOjLLsDZY/0.jpg" src="https://www.youtube.com/embed/0fTOjLLsDZY?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Available on both iOS and Android in 2.5 this is an essential use of 3D. You couldn't see all that much in 2D... well okay you can, but it's better in 3D.</div>
<div>
<br /></div>
<h4>
Truly 3D Terrain</h4>
<div>
<br /></div>
<div>
We've been able to do true 3D terrain for years. Aviation apps use it.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-w8VJvdVwxGQ/WEW4Irx29tI/AAAAAAAACww/XhtYToUQIIcDnYQZYDnk4s-BVYYq3zApACLcB/s1600/Screen%2BShot%2B2016-12-05%2Bat%2B10.54.50%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="247" src="https://1.bp.blogspot.com/-w8VJvdVwxGQ/WEW4Irx29tI/AAAAAAAACww/XhtYToUQIIcDnYQZYDnk4s-BVYYq3zApACLcB/s400/Screen%2BShot%2B2016-12-05%2Bat%2B10.54.50%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FlyQ EFB Synthetic Vision Mode</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
Why don't you see that more? Well, it's useful for aviation and.... um, games maybe? Users tend to be specialized.</div>
<div>
<br /></div>
<h4>
Models, Markers, Billboards, Labels & Lines</h4>
<div>
<br /></div>
<div>
The toolkit can display 3D models in <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">Wavefront OBJ</a>, a data format old enough to vote, but it works well enough.</div>
<div>
<br /></div>
<div>
We can also do billboards, which are like a 3D version of markers and, of course, labels. Here's what you'd use that for.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-d-6d6yXuA18/WEW5z9_MtRI/AAAAAAAACw4/vQNI0FI3c_8-MuUNMe6tiMThjTS00rVoQCLcB/s1600/ChicagoWeb.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="283" src="https://1.bp.blogspot.com/-d-6d6yXuA18/WEW5z9_MtRI/AAAAAAAACw4/vQNI0FI3c_8-MuUNMe6tiMThjTS00rVoQCLcB/s400/ChicagoWeb.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">NATS Airspace Explorer</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
Inspired to make your own 3D traffic app? Of course you are, but it's a lot of work to get the display right and the data is expensive.</div>
<div>
<br /></div>
<h4>
General 3D Geometry</h4>
<div>
<br /></div>
<div>
Lots of our users make stuff up on the fly. Why? Because if there was a pre-packaged version of it, they wouldn't be making an app.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-Vi_7w4ECvzs/WEW566FjNDI/AAAAAAAACw8/8x4TC6tBFyQrkp3Ncjap42o5HSIDSFuKwCLcB/s1600/GeneratedRunway.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="251" src="https://1.bp.blogspot.com/-Vi_7w4ECvzs/WEW566FjNDI/AAAAAAAACw8/8x4TC6tBFyQrkp3Ncjap42o5HSIDSFuKwCLcB/s400/GeneratedRunway.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fake airstrips are fake. Do not try to land.</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
For stuff like this we've got a model generator. You build up your special snowflake of a model polygon by text by line as needed.</div>
<div>
<br /></div>
<div>
If you've already got 3D geometry, you can hand the triangles over to the renderer. Hard core, but useful in a few cases.</div>
<div>
<br /></div>
<h4>
Lofted Polygons and Extrusions</h4>
<div>
<br /></div>
<div>
On the easier side are a couple of features that let you think in 2D and tack on a height.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-tx-RkhNQY-8/WEW6cjM9N6I/AAAAAAAACxA/gLvI9o264Isn2iQuRRenxjpqP6zND1DigCLcB/s1600/LoftedPolyPost.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="271" src="https://1.bp.blogspot.com/-tx-RkhNQY-8/WEW6cjM9N6I/AAAAAAAACxA/gLvI9o264Isn2iQuRRenxjpqP6zND1DigCLcB/s400/LoftedPolyPost.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Downright candy colored</td></tr>
</tbody></table>
<div>
<br />Lofted polygons have been around a long time and work well on the globe. They're nice for showing relative height... and they just look cool.</div>
<div>
<br /></div>
<div>
Extrusions are a way of whipping up a model without having to do, like, math. You can slap together an arrow, for example, to point at things.</div>
<div>
<br /></div>
<h4>
Where We're Heading</h4>
<div>
<br /></div>
<div>
WhirlyGlobe-Maply has extensive 3D support and real apps (mostly aviation) have been using it for years. It's all rather do-it-yourself though, particularly on the data side.</div>
<div>
<br /></div>
<div>
There are a number of good data sources for 3D coming on line recently. In the next post we'll discuss how we'd like to use them and where we'd like to go.</div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-54572417775787213072016-11-21T08:34:00.001-08:002016-11-21T08:35:28.047-08:00The Return of Mapbox StreetsA few weeks ago we withdrew support for Mapbox GL Style Sheets. You can <a href="http://mousebirdconsulting.blogspot.com/2016/08/deprecating-mapbox-gl-style-sheet.html">read about our reasoning</a> if you like.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-cKBJKOHqeyY/WC3sEnajN9I/AAAAAAAACnM/M3W98p3PUDo1eJ92jl5fClyPiFunP_DZgCLcB/s1600/Screen%2BShot%2B2016-11-17%2Bat%2B9.42.18%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="156" src="https://3.bp.blogspot.com/-cKBJKOHqeyY/WC3sEnajN9I/AAAAAAAACnM/M3W98p3PUDo1eJ92jl5fClyPiFunP_DZgCLcB/s400/Screen%2BShot%2B2016-11-17%2Bat%2B9.42.18%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Courtesy Mapbox</td></tr>
</tbody></table>
<br />
That's all changed! <a href="https://www.mapbox.com/">Mapbox</a> is opening up their mobile license for <a href="https://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a> users and offering competitive mobile pricing. We're responding by making it easier to use their data.<br />
<br />
<h3>
License and Pricing</h3>
<br />
WhirlyGlobe-Maply developers will be treated just like Mapbox GL devs for tracking and billing purposes. You should email enterprise@mapbox.com to get an amended license that will look a bit like this.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-xbrltRmSMJk/WC3rjKl9M4I/AAAAAAAACnI/oU6pqdEBxZIf95FasfD0-FgSdTrqC1VMgCLcB/s1600/Screen%2BShot%2B2016-11-17%2Bat%2B9.40.07%2BAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://2.bp.blogspot.com/-xbrltRmSMJk/WC3rjKl9M4I/AAAAAAAACnI/oU6pqdEBxZIf95FasfD0-FgSdTrqC1VMgCLcB/s400/Screen%2BShot%2B2016-11-17%2Bat%2B9.40.07%2BAM.png" width="400" /></a></div>
<br />
<br />
If you want to use Mapbox vector tiles on more than 50,000 devices or you're doing device tracking, talk to them. That's all standard stuff in their agreement. If you want the mobile pricing, talk to the sales department.<br />
<br />
<h3>
Telemetry & Offline Use</h3>
<div>
<br /></div>
<div>
We're being treated as an equal to Mapbox GL here and that is great, but there are responsibilities. Mapbox GL sends back telemetry to improve OpenStreetMap and do traffic stuff. We'll have to do the same.</div>
<div>
<br /></div>
<div>
The standalone telemetry library isn't ready and we're proceeding without it. When it's ready, we'll integrate it with WhirlyGlobe-Maply. It'll be on only for Mapbox data sources.</div>
<div>
<br /></div>
<div>
As for offline Mapbox Streets use, you're subject to the same rules as Mapbox GL. If you ask how to work around that, I'll be happy to refer you to Mapbox's <a href="https://www.mapbox.com/tos/">terms of service</a>.</div>
<div>
<br /></div>
<h3>
Who's This For?</h3>
<div>
<br /></div>
<div>
WhirlyGlobe-Maply occupies a niche in real time data display. We're big in weather and aviation apps, with a smattering of other specialized users. And developers who just want a globe, obviously.</div>
<div>
<br /></div>
<div>
<div>
I see the biggest potential in two kinds of base maps. First up, Mapbox Satellite Streets. This fills in a nice hole in apps that want an optional satellite mode with a sprinkling of transportation.</div>
</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-UuzuLK5WHlc/WC3pfJ7HIrI/AAAAAAAACnA/6qCXE-Y94igGEx5W-3VrGdVjxEXhzJZLQCLcB/s1600/Screen%2BShot%2B2016-11-17%2Bat%2B9.18.39%2BAM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="176" src="https://4.bp.blogspot.com/-UuzuLK5WHlc/WC3pfJ7HIrI/AAAAAAAACnA/6qCXE-Y94igGEx5W-3VrGdVjxEXhzJZLQCLcB/s400/Screen%2BShot%2B2016-11-17%2Bat%2B9.18.39%2BAM.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Also Mapbox</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
Next up, a stripped down variant of Mapbox Streets suitable for data overlay. They have a few starting points here and we can tweak a bit.</div>
<div>
<br /></div>
<h3>
Schedule & Shout Out</h3>
<div>
<br /></div>
<div>
WhirlyGlobe-Maply 2.5 is getting close to release so we're not going to hold it up for this. We'll put the Mapbox GL Style Sheet support back in 2.5.1 and do a bit of testing.</div>
<div>
<br /></div>
<div>
Lastly, a shout out to the folks at Mapbox. We thought you'd gone all <a href="http://devblog.mapquest.com/2016/06/15/modernization-of-mapquest-results-in-changes-to-open-tile-access/">Mapquest</a> on us, but you haven't! Cool.</div>
<div>
<br /></div>
SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0tag:blogger.com,1999:blog-2893633529075801218.post-21677903009942061882016-09-14T09:42:00.002-07:002016-09-14T09:44:44.340-07:00MapKit Compatibility RoadmapWe get asked this one a lot: "Why can't you be more like MapKit?" It's a good question.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-sp8pPURix7U/V9l8YYseIQI/AAAAAAAABms/XItk2t0eWgMEOYLGgRoHwSt-1xM5S67kACLcB/s1600/London.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="126" src="https://4.bp.blogspot.com/-sp8pPURix7U/V9l8YYseIQI/AAAAAAAABms/XItk2t0eWgMEOYLGgRoHwSt-1xM5S67kACLcB/s400/London.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MapKit, obviously.</td></tr>
</tbody></table>
<br />
Internally the toolkit won't ever be more like MapKit. But we can pretend in a couple of ways: Overlays and Interfaces.<br />
<br />
<h4>
MapKit Overlay</h4>
<br />
<a href="https://developer.apple.com/reference/mapkit">MapKit</a> provides overlay options for everything from markers to tiled image sources. Annotations are super flexible, but very slow beyond a handful. And don't even think about animated tile sources. Ouch.<br />
<br />
For some data sources it's going to be easier to render in <a href="http://mousebird.github.io/WhirlyGlobe/">WhirlyGlobe-Maply</a> and slap the results on top of MapKit's UIView.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-UNH0Fx9hVUs/V9l8YTlpkGI/AAAAAAAABmw/yeC3VG-YP7E5PF3VOGkNyLNIAeZB6UUegCLcB/s1600/NewYorkStation.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="130" src="https://1.bp.blogspot.com/-UNH0Fx9hVUs/V9l8YTlpkGI/AAAAAAAABmw/yeC3VG-YP7E5PF3VOGkNyLNIAeZB6UUegCLcB/s400/NewYorkStation.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It's not topical, I just like MapKit's stations.</td></tr>
</tbody></table>
<br />
That's the solution. We'll track what MapKit is up to, at least in flat map mode, and overlay our own rendering to match. Think weather apps.<br />
<br />
<h4>
MapKit Interfaces</h4>
<br />
MapKit has a nice collection of interfaces for adding annotations, great circles, and all sorts of other good stuff. We'll try to be more compatible with those.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-gVoIEJlraj0/V9l8YRt3yxI/AAAAAAAABmo/d849yQx-8b8Y6EIMnosnLVcRcUa8z4heQCLcB/s1600/Portland.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="112" src="https://1.bp.blogspot.com/-gVoIEJlraj0/V9l8YRt3yxI/AAAAAAAABmo/d849yQx-8b8Y6EIMnosnLVcRcUa8z4heQCLcB/s400/Portland.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Portland in MapKit. Why not?</td></tr>
</tbody></table>
<br />
This means methods that take <a href="https://developer.apple.com/reference/mapkit/mkmappoint">MKMapPoint</a> or <a href="https://developer.apple.com/reference/corelocation/1612510-core_location_data_types">CLLocationCoordinate2D</a> objects. It means init calls that are similar to the MapKit equivalents. And yes, it means working in <i>(shudder)</i> degrees.<br />
<br />
The goal here is a simpler conversion from a MapKit app to a WhirlyGlobe-Maply app.<br />
<br />
<h4>
UIView vs UIViewController</h4>
<br />
This one really bugs a handful of developers. Our main interfaces are derived from <a href="https://developer.apple.com/reference/uikit/uiviewcontroller">UIViewController</a> rather than <a href="https://developer.apple.com/reference/uikit/uiview">UIView</a>.<br />
<br />
View Controllers are nice because they have life cycle events. You have to wire all that up yourself in a UIView. But it's possible and we'll do it because we know you want it.<br />
<br />
<h4>
Roadmap Not Actual Size</h4>
<br />
That's the plan and this all goes in the base toolkit so it'll be free. But we need money to do it. Always with the money.<br />
<br />
As with all our plans, it'll get done eventually. Pieces will go into proposals, clients will step forward, and some of it we'll just do ourselves.<br />
<br />
Got feedback? Let us know.<br />
<br />SteveGhttp://www.blogger.com/profile/14427627512782371515noreply@blogger.com0