Esri / calcite-maps

A Bootstrap theme for designing, styling and creating modern map apps.
http://esri.github.io/calcite-maps/samples/index.html
Apache License 2.0
239 stars 173 forks source link

Street view toggle error #161

Closed ezequias closed 7 years ago

ezequias commented 7 years ago

I am getting the following error when I try to load Street view widget.

StreetView.js:168 Uncaught TypeError: this.parentWidget.toggle is not a function at Object.getStreetView (StreetView.js:168) at Object. (init.js:63) at Object. (init.js:645) at Object.c [as onClick] (init.js:119) at Object._fire (init.js:1279) at Object._fireClickEvent (init.js:1285) at init.js:63

alaframboise commented 7 years ago

Can you provide a jsBin repo?

ezequias commented 7 years ago

@alaframboise it's the same project enabled by this repo (the repoI am posting this issue). I will try to do it on jsBin.com.

ezequias commented 7 years ago

I am not able to load the entire project on jsbin (actually I think it is impossible). The street view widget was not customized. I think it is bugged @alaframboise

alaframboise commented 7 years ago

@ezequias ok just let me know when you have a test case for me look at. Thanks.

alaframboise commented 7 years ago

You are trying to load the jQuery calcite-maps library with the dojo loader. If you are using jQuery and want to use the calcite-maps jQuery lirbary, i would just use load the calcite-maps jQuery library outside of dojo. Check out this example.

https://github.com/Esri/calcite-maps/blob/master/samples/arcgis-4.x/arcgis-4.x-2d-3d-jQuery.html

ezequias commented 7 years ago

Thanks @alaframboise but I was using Bootstrap calcite-maps. I you could check if the library is ready for streetview I would be glad.

alaframboise commented 7 years ago

You can mix and match as you please.

Here's an example using dojo to load bootstrap and calcite-maps and jQuery is loaded at the end. https://jsbin.com/damafe/edit?html

This one loads dojo just for ArcGIS and then jQuery for bootstrap and calcite-maps. https://jsbin.com/zowizeq/edit?html

ezequias commented 7 years ago

I tried to load your sample after trying to add Streetview dijit widget but I failed on it: http://codepen.io/ezequias/pen/xdxeXR?editors=1000

The attached file below contains all widgets deployed (including Streetview) from calcite-maps gis.zip

alaframboise commented 7 years ago

@ezequias There are a few issues here: 1) The widget code looks like it's for the Web AppBuilder and the ArcGIS JS 3.x API and this is a custom sample that loads the JS 4.x API, 2) I believe some of the required widget dependencies are missing, 3) I also assume you need to wire the widget up to a div in the panel view it?

Either way I do not believe this is a calcite-maps framework issue.

alaframboise commented 7 years ago

Closing.