Skip to content

Commit

Permalink
change launch to be relative
Browse files Browse the repository at this point in the history
  • Loading branch information
coomsie authored Nov 9, 2016
1 parent 4ff1c20 commit 490b2ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions widgets/Explore/js/LaunchItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ define([
exent += this._map.extent.xmax + ",";
exent += this._map.extent.ymax + ",";
exent += this._map.extent.spatialReference.wkid;

url = response.item.Url.replace("{id}", response.item.Id);

// this line below launches the url from api instead of building url relative to WAB location.
//url = response.item.Url.replace("{id}", response.item.Id);
//TODO Need to change code so that it reload webmap instead of whole WAB like ECan js viewer version 1.
url = "?webmap=" + response.item.Id;
url += "&extent=" + exent;
window.open(url, '_self');

Expand Down

5 comments on commit 490b2ca

@SamDrummond
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coomsie: Happy to change the webmap URL so it loads from a relative location - I developed it to run from the api because the URL was fully qualified.

@SamDrummond
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coomsie, we looked at reloading the webmap in the original gallery widget 18months ago but took it out of scope due to the effort managing other interactive widgets - i.e. what happens to drawn graphics, what happens if a widget is configured against a layer in the map and that layer is no-longer present in the map. The web map switcher code could possibly be used but there are limitations.

@coomsie
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah happy to leave that (webmap switcher) till another round .... need to get this out the door

@SamDrummond
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. I'll add it to the bugs list as an enhancement. I was concerned that I missed a requirement. I'm just adding one more fix to get the description to load - I missed this in the migration but should be ready soon.

@coomsie
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want to look at this too ...

CanterburyRegionalCouncil/CanterburyMaps_NativeMobile#23

Please sign in to comment.