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

Projected Coordinates in URL #6

Open
carey136 opened this issue Nov 20, 2014 · 5 comments
Open

Projected Coordinates in URL #6

carey136 opened this issue Nov 20, 2014 · 5 comments

Comments

@carey136
Copy link

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?

@carey136 carey136 changed the title Non Mercator Coordinates in URL Projected Coordinates in URL Nov 20, 2014
@BrianBunker
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

BrianBunker commented May 11, 2016

Notes for implementation:

  • Check the basemap service wkid on load
  • Use http://proj4js.org/ (+1 network call to retrieve library) to project points using projection definitions at http://spatialreference.org/ref/epsg// (+1 network call to retrieve definition)
  • Treat 102100 (3857) differently since it's not easily referenced from spatialreference.org -- trivial since this is current default for the widget

@tmcgee
Copy link
Contributor

tmcgee commented Jun 6, 2016

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
Copy link
Owner

Thanks for the reference!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants