Skip to content

mapzen.js doesn't load with requirejs #382

@marianoguerra

Description

@marianoguerra

here's a minimal example:

http://marianoguerra.github.io/bugs/mapzen-requirejs/

you can see the code here:

https://github.com/marianoguerra/marianoguerra.github.io/blob/master/bugs/mapzen-requirejs/app.js

looking at the code in mapzen.js you call define(['leaflet'], factory) in line 1236 but leaflet is defined in line 1836 as define(L) (which I think it should be define('leaflet', L))

I tried using mapzen.standalone.min.js instead and loading my leaflet:

https://github.com/marianoguerra/marianoguerra.github.io/blob/master/bugs/mapzen-requirejs/app.standalone.js

but as you can see here, it complains that "ReferenceError: Tangram is not defined":

http://marianoguerra.github.io/bugs/mapzen-requirejs/standalone.html

reading the code, I passed _useTangram: false in options but then it renders a gray map and never request the tiles.

my code was working with leaflet and osm tiles, can I set mapzen tiles url template, api key and attribution directly on leaflet? is there something else I have to do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions