Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Added additional JavaScript API attributes #39

Merged
merged 1 commit into from
Apr 1, 2015
Merged

Conversation

eas604
Copy link
Contributor

@eas604 eas604 commented Mar 29, 2015

angular-esri-map only supported a few ESRI JavaScript API attributes by default. I needed to support a few more in a project I'm working on, so I added most of the attributes:

attributionWidth, autoResize, displayGraphicsOnPan, fadeOnZoom, fitExtent, force3DTransforms, logo, maxScale, maxZoom, minScale, minZoom, nav, navigationMode, optimizePanAnimation, resizeDelay, scale, showAttribution, showInfoWindowOnClick, slider, sliderOrientation, sliderPosition, sliderStyle, smartNavigation, wrapAround180

You can see several of these directives in test/additional-attributes.html.

@tomwayson tomwayson assigned tomwayson and unassigned tomwayson Mar 30, 2015
@tomwayson
Copy link
Member

Thanks @eas604!

I've tried these changes locally, and they work well and don't break the existing API.

However, it seems that most of these attributes are only used at map creation time, and therefore it would be better to read them from $attrs instead of having them bound to the isolated scope. For example, see how the map directive checks for an extent.

So, even though it is not our goal to have 1 to 1 parity w/ the JSAPI functionality, I'm inclined to merge this if it's modified to read the map options from $attrs. Would like to hear thoughts from @patrickarlt, @dbouwman, @jabadia, @mpriour as well.

@eas604
Copy link
Contributor Author

eas604 commented Mar 30, 2015

Sounds good to me. I actually originally had the attributes in $attrs, and it won't be a problem to switch.

@eas604
Copy link
Contributor Author

eas604 commented Mar 30, 2015

Attributes have been moved to $attrs. Please let me know if there's anything else I can do.

@tomwayson
Copy link
Member

Nice work @eas604.

Would you mind squashing those commits? (You asked...) Once that's done I'll verify and merge unless I hear any objection from the others.

Thanks!

@eas604
Copy link
Contributor Author

eas604 commented Mar 30, 2015

Squashed! Thanks @tomwayson

tomwayson added a commit that referenced this pull request Apr 1, 2015
Added additional map options as attributes of `<esri-map />` directive
@tomwayson tomwayson merged commit 8bc0f60 into Esri:master Apr 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants