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

add fit-bounds and global map-id configuration support #28

Closed
wants to merge 1 commit into from
Closed

add fit-bounds and global map-id configuration support #28

wants to merge 1 commit into from

Conversation

CaryLandholt
Copy link

Add mapId to the service configuration to use this id globally or as a fallback when not specified in markup.

mapboxService.init({ accessToken: 'YOUR_ACCESS_TOKEN' , mapId: 'YOUR_MAP_ID' });

Add the fit-bounds markup attribute to force the map to fit the feature bounds.

<mapbox fit-bounds>
  <!-- map content here -->
</mapbox>

add global map-id configuration support
@sllvn
Copy link
Owner

sllvn commented Sep 7, 2015

Sorry for the slow turnaround. Took a look at your fork and the geojson.html example map wouldn't render for me when I added the fit-bounds attribute.

There already exists a scale-to-fit attribute that can be added to the <mapbox> element, however it does not currently work with feature layers. I've created a new ticket for this at #35. Thanks for bringing this to my attention.

@sllvn sllvn closed this Sep 7, 2015
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

Successfully merging this pull request may close these issues.

2 participants