Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OverviewMap plugin #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added OverviewMap plugin #117

wants to merge 3 commits into from

Conversation

alrocar
Copy link

@alrocar alrocar commented Feb 11, 2012

I've added a plugin to add the OpenLayers OverviewMap Control to the Viewer. It can be configured to load an already loaded layer to the map or a layer from a LayerSource.

I've added two examples, one adding an OSM OverviewMap and another adding a WMS layer.

@alrocar
Copy link
Author

alrocar commented Feb 11, 2012

Sorry, I forgot to add OverviewMap.js to the loader.js

@acoiman
Copy link

acoiman commented May 21, 2016

Hello
Do you know where I can find a plugin to add the openlayer mouse position?

Thanks

AC

@bartvde
Copy link
Contributor

bartvde commented May 23, 2016

I think you can add it to the controls section of the map config of a Viewer, but you'll need to repeat the controls that are added by default and you need to make sure MousePosition is in your build (use a @requires): https://github.com/boundlessgeo/gxp/blob/master/src/script/widgets/Viewer.js#L507:L515

@acoiman
Copy link

acoiman commented May 23, 2016

Thanks a lot


De: Bart van den Eijnden [email protected]
Enviado: lunes, 23 de mayo de 2016 06:59 a.m.
Para: boundlessgeo/gxp
Cc: Abraham Coiman; Comment
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

I think you can add it to the controls section of the map config of a Viewer, but you'll need to repeat the controls that are added by default and you need to make sure MousePosition is in your build (use a @requireshttps://github.com/requires): https://github.com/boundlessgeo/gxp/blob/master/src/script/widgets/Viewer.js#L507:L515

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//pull/117#issuecomment-220955123

@acoiman
Copy link

acoiman commented May 24, 2016

Thanks

It works perfect perfectly.

Now, it shows EPSG: 4265 and 3857 only. How can I change the showed CRS to EPSG:32619?

Thanks in advance

AC


De: Bart van den Eijnden [email protected]
Enviado: lunes, 23 de mayo de 2016 06:59 a.m.
Para: boundlessgeo/gxp
Cc: Abraham Coiman; Comment
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

I think you can add it to the controls section of the map config of a Viewer, but you'll need to repeat the controls that are added by default and you need to make sure MousePosition is in your build (use a @requireshttps://github.com/requires): https://github.com/boundlessgeo/gxp/blob/master/src/script/widgets/Viewer.js#L507:L515

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//pull/117#issuecomment-220955123

@bartvde
Copy link
Contributor

bartvde commented May 24, 2016

Check displayProjection for ol.control.MousePosition (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html) you might need to add that projection using proj4js if you have not already done that.

@acoiman
Copy link

acoiman commented May 26, 2016

Hello...

Unfortunately ol.control.MousePosition doesn't work as expected .

I added proj4js dependency in app.js and in the HTML header.

Also, I add my EPSG definition in proj4/lib/def

I added some lines in app.js as stated at (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html)

controls: [
new OpenLayers.Control.Navigation({
zoomWheelOptions: {interval: 250},
dragPanOptions: {enableKinetic: true}
}),
new OpenLayers.Control.PanPanel(),
new OpenLayers.Control.ZoomPanel(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.MousePosition({displayProjection: new OpenLayers.Projection("EPSG:32619")})

However, it still shows EPSG:32619 coordinates.

I would be very grateful if you could help me solve this issue.

AC


De: Bart van den Eijnden [email protected]
Enviado: martes, 24 de mayo de 2016 08:10 a.m.
Para: boundlessgeo/gxp
Cc: Abraham Coiman; Comment
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

Check displayProjection for ol.control.MousePosition (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html) you might need to add that projection using proj4js if you have not already done that.

OpenLayers.Control.MousePosition - OpenLayers 2http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html
dev.openlayers.org
OpenLayers. Control. MousePosition: The MousePosition control displays geographic coordinates of the mouse pointer, as it is moved about the map. Properties

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//pull/117#issuecomment-221256166

@acoiman
Copy link

acoiman commented May 26, 2016

Sorry

I,ve made a mistake

it still shows EPSG:900913 coordinates, not EPSG:32619

AC


De: Abraham Coiman [email protected]
Enviado: miércoles, 25 de mayo de 2016 10:57 p.m.
Para: boundlessgeo/gxp
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

Hello...

Unfortunately ol.control.MousePosition doesn't work as expected .

I added proj4js dependency in app.js and in the HTML header.

Also, I add my EPSG definition in proj4/lib/def

I added some lines in app.js as stated at (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html)

controls: [
new OpenLayers.Control.Navigation({
zoomWheelOptions: {interval: 250},
dragPanOptions: {enableKinetic: true}
}),
new OpenLayers.Control.PanPanel(),
new OpenLayers.Control.ZoomPanel(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.MousePosition({displayProjection: new OpenLayers.Projection("EPSG:32619")})

However, it still shows EPSG:32619 coordinates.

I would be very grateful if you could help me solve this issue.

AC


De: Bart van den Eijnden [email protected]
Enviado: martes, 24 de mayo de 2016 08:10 a.m.
Para: boundlessgeo/gxp
Cc: Abraham Coiman; Comment
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

Check displayProjection for ol.control.MousePosition (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html) you might need to add that projection using proj4js if you have not already done that.

OpenLayers.Control.MousePosition - OpenLayers 2http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html
dev.openlayers.org
OpenLayers. Control. MousePosition: The MousePosition control displays geographic coordinates of the mouse pointer, as it is moved about the map. Properties

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//pull/117#issuecomment-221256166

@acoiman
Copy link

acoiman commented May 26, 2016

Sorry

I,ve made a mistake

it still shows EPSG:900913 coordinates, not EPSG:32619

AC


De: Bart van den Eijnden [email protected]
Enviado: martes, 24 de mayo de 2016 08:10 a.m.
Para: boundlessgeo/gxp
Cc: Abraham Coiman; Comment
Asunto: Re: [boundlessgeo/gxp] Added OverviewMap plugin (#117)

Check displayProjection for ol.control.MousePosition (http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html) you might need to add that projection using proj4js if you have not already done that.

OpenLayers.Control.MousePosition - OpenLayers 2http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html
dev.openlayers.org
OpenLayers. Control. MousePosition: The MousePosition control displays geographic coordinates of the mouse pointer, as it is moved about the map. Properties

You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com//pull/117#issuecomment-221256166

@acoiman
Copy link

acoiman commented Jun 9, 2016

It works perfectly. I had to put the projs4 library in src/gxp/script/ folder.

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

Successfully merging this pull request may close these issues.

3 participants