Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't override xml-provided source using the constructor opts #21

Open
gravitystorm opened this issue Dec 30, 2013 · 0 comments
Open

Can't override xml-provided source using the constructor opts #21

gravitystorm opened this issue Dec 30, 2013 · 0 comments

Comments

@gravitystorm
Copy link

It's not possible (or if it is, not obvious how!) to override the source provided in the xml. This would be useful, for example, when using a style generated by tm2, but serving the vector tiles from a local cache on a non-networked device.

With the options passed to the constructor, the source is handled differently from other options, such as scale and format. The xml-provided values for these can be overridden in the constructor opts, but the reverse happens for source - the xml value overrides any source provided in the constructor.

this._format = opts.format || map.parameters.format || this._format || 'png8:m=h';

I think if a source is provided in the constructor, then it should override the source in the xml, as per the behaviour of scale and format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant