BrianBunker / cmv-widgets

Widgets based on the Esri jsapi, configured for the Configurable Map Viewer. Widgets include Drag and Drop, Goto, Map Navigation Hash, and Nearby.
https://brianbunker.github.com/cmv-widgets
MIT License
18 stars 24 forks source link

Projected Coordinates in URL #6

Open carey136 opened 9 years ago

carey136 commented 9 years ago

Hi @BrianBunker. The widget you've coded is exactly the solution i've been looking for, but I'm encountering a problem with projection.

My basemaps and layers all use the EPSG: 27700 (British National Grid). When I attempt to use the widget, the URL contains a static, meaningless co-ordinate and tile scale reference (#/4.1782/4.6218/2).

The browser error received for the mis-display is "Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 27700)".

Would I be correct in assuming that the widget does not support projected coordinate systems? And if this is the case, would it be of interest to include this functionality in the near future?

BrianBunker commented 9 years ago

You are correct that the widget does not currently support projected coordinate systems. It would be of interest to include this functionality, but I do not have the time to undertake this addition currently. Pull requests are welcome.

carey136 commented 9 years ago

No worries. Sadly, after a few hours of flapping,I realise it is above me to add the desired code. I may have to ask for assistance on this one.

@btfou, @tmcgee, @tr3vorm - I've been trying to borrow code from the MapInfo widget to feed into the URL of this widget but i'm running into to trouble (namely, I have no idea what i'm doing). would you be able to offer any advice/assistance. This widget offers a great opportunity for other programs/applications to generate simple URL's for the viewer which can be shared or opened on command; as well as improved navigation with the back and forward buttons. It would be great to be able to use with projected coordinate systems.

Thanks

BrianBunker commented 8 years ago

Notes for implementation:

tmcgee commented 8 years ago

For reference, I now use https://epsg.io/ to retrieve projection definitions instead of http://spatialreference.org/ because the latter is not available via SSL/HTTPS.

Soon I plan to convert the existing CMV core widgets (StreetView and MapInfo) to use https://epsg.io/. The HTTPS url will work regardless of whether the app is served from HTTP or HTTPS domain.

BrianBunker commented 8 years ago

Thanks for the reference!