GithubHelp home page GithubHelp logo

Comments (9)

tallytalwar avatar tallytalwar commented on June 26, 2024 1

Whats currently there in the docs will actually not compile for tangram-es!

from cartography-docs.

nvkelso avatar nvkelso commented on June 26, 2024

This newer syntax has been around since Tangram ES 0.4.9-android so don't think we need to clarify versions in the docs.

Should split the example code into just the API key, and then showing how to chain multiple globals together in the lower sections.

from cartography-docs.

nvkelso avatar nvkelso commented on June 26, 2024

Fixed in #40.

from cartography-docs.

nvkelso avatar nvkelso commented on June 26, 2024

Fix is live, closing.

(Screenshot below)

screen shot 2017-10-23 at 14 02 43

from cartography-docs.

matteblair avatar matteblair commented on June 26, 2024

The specific syntax for this is going to vary depending on the platform where you're using Tangram ES. The syntax in that last screenshot is what you would if you were using the C++ interface directly, not what you would use for Android or iOS (which is probably most users). It may be easier and more useful to just link to the relevant documentation for the Tangram ES mobile platforms.

from cartography-docs.

nvkelso avatar nvkelso commented on June 26, 2024

from cartography-docs.

matteblair avatar matteblair commented on June 26, 2024

Or maybe we can show the Tangram ES code for both iOS and Android, since this section has several examples already.

from cartography-docs.

nvkelso avatar nvkelso commented on June 26, 2024

@matteblair Both work for me, if you provide the snippets and links :)

from cartography-docs.

matteblair avatar matteblair commented on June 26, 2024

This would look like..

On Android, with a MapController object named mapController:

mapController.loadSceneFileAsync(
    "https://mapzen.com/carto/refill-style/6/refill-style.yaml",
    Arrays.asList(new SceneUpdate("global.sdk_mapzen_api_key", "mapzen-xxxxxx")
);

On iOS, from your MapViewControllerDelegate:

[super loadSceneAsyncFromURL:[NSURL URLWithString:@"https://mapzen.com/carto/refill-style/6/refill-style.yaml"]
                 withUpdates:@[[[TGSceneUpdate alloc]initWithPath:@"global.sdk_mapzen_api_key" value:@"mapzen-xxxxxx"]]];

from cartography-docs.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.