Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Standardize support for url params #57

Closed kellyhutchins closed 9 years ago

kellyhutchins commented 9 years ago

Add a new class that handles supporting map params like center, zoom, level, extent.

driskull commented 9 years ago

Add:

Maybe:

kellyhutchins commented 9 years ago

@driskull zoom and level are the same we should probably use level as teh url param since that's what online uses.

I think the most commonly requested params are center, extent, level and find so those are the ones I think we should support. I don't think we should add support for the others to the template boilerplate at this time.

driskull commented 9 years ago

@ycabon for 4.0 do you think it would make sense to just rename the map option from "zoom" to "level" if that's what we're calling it everywhere?

kellyhutchins commented 9 years ago

Pull request looks good - merged.

ycabon commented 9 years ago

@driskull for 4.0, we are using zoom, not level. WebMap has also some props like min/maxZoom. Level only exists in LOD.

driskull commented 9 years ago

hmmm. consistency is tough :(

The online viewer uses "level" as a URL parameter so thats what our apps were going to use. I'm wondering if we should use "zoom" instead.

Maybe we should just add both so someone could use either of them lol.

kellyhutchins commented 9 years ago

@driskull i have some apps that use zoom as a url param to hide/show the zoom slider... so maybe just stick with level and make sure we doc what setting the value means?

driskull commented 9 years ago

ok. Seems like the 4.0 API should use level, zoomLevel or just maxLevel, MinLevel. zoom is kinda vague. zoom what?

ycabon commented 9 years ago

Another to see that feature could be to encode the map location as one parameter? center/zoom