

Introducing Mapbox GL - incanus77
https://www.mapbox.com/blog/mapbox-gl/

======
bluthru
>Maps render at a super high framerate

You might want to use a nice HTML5 video instead of a .gif, then. It didn't
make for a good first impression.

~~~
estebank
Or an actual map, scripted to move.

~~~
mourner
Sure. Oh but wait, there is an actual map there!

------
faximan
Well, damn. I just spent five months writing a GLES iOS renderer for mapnik-
vector-tiles as a master thesis project.

I said, "as far as we know, nothing like this has ever been done before". Good
thing the presentation was last week I guess...

~~~
joedoe101
Will you open source it?

~~~
faximan
Unfortunately, not at this moment. It might be used in a commercial product.

~~~
rmc
You can still use open source commercially. Make it GPLv3 or something, if you
wanna tie the hands of anyone who uses it

------
hornetblack
Hard coded compiler version?

    
    
        Could not find compiler set in environment variable CC:
    
        gcc-4.8.
    

I'm running gcc-4.9. I got it working by doing:

    
    
        ln -s /usr/bin/gcc ~/bin/gcc-4.8
        ln -s /usr/bin/g++ ~/bin/g++-4.8
    

I'm not saying this is good practice, but it works.

Also need to make sure python means python2.

~~~
danespringmeyer
Thanks for noting these issues. I've made a note about Python 2.x in the
readme ([https://github.com/mapbox/mapbox-gl-
native/commit/ae7e3de61c...](https://github.com/mapbox/mapbox-gl-
native/commit/ae7e3de61c209d32ec52372a21726941e7fe652a)). As far as the
compiler, g++-4.9 is fine to use. If you hit an error with it could you share
the details in an issue? [https://github.com/mapbox/mapbox-gl-
native/issues](https://github.com/mapbox/mapbox-gl-native/issues)

~~~
green7ea
I had to change: #!/usr/bin/env python to: #!/usr/bin/env python2

in the python scripts to get it working under archlinux. If this works on the
other platforms, that might be a good change.

------
i_am_ralpht
I've wanted to write a GLES 2 map renderer for ages -- ever since I saw that
the Apple Maps app on iOS uses MSAA for antialiasing (yuck!).

It's funny to see all the usual 2D suspects in the source (clipper, GLU
tessellator). They used a distance-based edge shader for antialiasing, so it
should look much better than MSAA.

I'm not sure why there's a bias factor of 2 in the "raster" fragment shader --
looks like it might have been added by accident. It's interesting that they
use both the stencil and depth buffers for clipping -- I hope they do a write
up on some of the techniques they developed!

~~~
kkaefer
> I'm not sure why there's a bias factor of 2 in the "raster" fragment shader
> -- looks like it might have been added by accident.

Yes, that was an accident. Thanks for noticing! We definitely have a lot of
information to share about the process. Regarding clipping, we're not sure yet
whether what we have right now is the best thing; there will certainly be
improvements in that area.

------
green7ea
This is really cool. It seems that instead of using mipmaps to generate a map,
they are using a combination of curves and 2D shapes. This is very smart since
the data is not only more compact but can also be visualised in a very fluid
manner. The bottleneck is now the GPU instead of the data connection. Give me
the ability to download a city's map on Android and I'm dropping google maps
like a brick.

~~~
jonas21
Google Maps also uses GPU-rendered vector geometry for their maps on Android
(since 2010) and iPhone:

[http://www.engadget.com/2010/12/16/google-maps-5-0-hits-
andr...](http://www.engadget.com/2010/12/16/google-maps-5-0-hits-android-
includes-new-3d-map-view-and-offli/)

~~~
incanus77
Yes. Mapbox is 1) completely open source and 2) completely flexible design-
wise.

------
NathanKP
The vector map demo on the page has a serious issue with street names not
showing up until you zoom way in, so far in that you can't see the context of
the street anymore.

I assume this is for performance purposes, but it makes the map feel much less
usable than Apple Maps in my opinion.

For comparison:

Apple Maps: [http://i.imgur.com/jqPHej2.png](http://i.imgur.com/jqPHej2.png)
vs Mapbox Maps:
[http://i.imgur.com/rVH775b.png](http://i.imgur.com/rVH775b.png)

~~~
softwarehippie
You do realize that this 100% configurable by stylesheets? The entire point
is, that their maps are stylable by the user (i.e. the app developer).

~~~
NathanKP
Of course. I've used Mapbox before and messed around with customizing the
stylesheets. But the reality is that creating your own stylesheets is a level
of effort and attention to detail that most projects/startups can't afford to
take on, at least not at first.

The default stylesheets should look good and work well out of the box. Then if
you have the time and manpower to customize them further great.

~~~
incanus77
One of the design goals with GL was to support cascading styles, so you can
start with the predefined world map and just provide deltas of the things you
want to change. For example: "Hide the buildings, set the text font to X, swap
the stacking order of layers A and B, and override the default park color to
blue".

------
ajtaylor
I played around with the demo map and the scrolling was indeed super quick,
along with zoom level changes. If they could do the same thing with WebGL so
that we'd have vector maps in the browser (like Google maps) that would be
awesome. The competition would be good for everyone.

~~~
tmcw
If you're talking about the demo map in the blog post, you just played with
the WebGL version :)

~~~
ljoshua
More details here would be great! Seems like a souped-up version of Leaflet.

Man I love the stuff that MapBox puts out. High quality.

------
bgun
Didn't believe the WebGL demo until I rotated (ctrl-drag). Hope it feels as
good on a mobile browser.

------
zackmorris
Does anyone know if they are planning perspective (affine) transformation?
Specifically, relief maps drawn at the correct (or exaggerated) elevation,
with the labels still drawn upright?

~~~
incanus77
Yes, eventually.

------
gelatocar
Is anyone else seeing duplicated and mirrored labels in the demo?
[http://i.imgur.com/998pDUR.png](http://i.imgur.com/998pDUR.png)

~~~
kkaefer
This looks indeed odd. Can you please share more information about your
computer, OS and browser?

~~~
TeeWEE
I have the same issue, but it looks even worse:
[http://i.imgur.com/WJQcZp8.png](http://i.imgur.com/WJQcZp8.png)

My user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36

I'm running on 15'' macbook pro, OS X 10.8.5 on a 2.2GHZ i7, with 8GB of
memory.

------
cheeaun
So this is only for iOS? Is there one for the web?

~~~
diroussel
The demo is a version for the web.

------
pmoods
It was only a matter of time before the mapping feature evolved yet again,
glad to get a quick glimpse of this awesome technology.

------
olegbl
Sooooo... where do I get the WebGL (demo on the page) version? I want that.

