[OpenLayers-Users] Using OpenLayers in a portlet environment

2009-05-21 Thread Marco Ferretti
Hi all, I am very happy with openlayers, so happy that I have been trying to convert my application to a porlet . I am using Liferay portal as dev environment and I have successfully managed to load OpenLayers.js within my portlet but I am facing an error : this.projection is null

[OpenLayers-Users] Control styling via javascript

2009-05-21 Thread goliah
Dear list, I have a piece of code that creates a control and puts it in a panel. here's a snippet: //snippet var container = document.getElementById(mypanel); var panel = new OpenLayers.Control.Panel( {div: container}); function addControl(layer, controlName){ //create control

[OpenLayers-Users] Add Feature and Pan into View

2009-05-21 Thread soatley
Hello, Does anyone know how to have the map pan when adding a feature to a vector layer so that the entire feature is in view? Here's my code so far that works: //define the popup infoPopup = new OpenLayers.Popup.FramedCloud(info, mouseLoc,

[OpenLayers-Users] OpenLayers.control.attribution is not a constructor Error

2009-05-21 Thread Nicholas Efremov-Kendall
Hi all, another newbie question. I have a simple version of OL loading GML happily now, but having moved my page into the body of another site (i.e. remapped the css and js), I get this error OpenLayers.control.attribution() is not a constructor on line 8382. I'm (obviously) a novice to Jscript

Re: [OpenLayers-Users] Add Feature and Pan into View

2009-05-21 Thread Alexandre Dube
Hi, You could register a beforefeatureselected event on your vector layer and set the map extent according to the feature's extent. I think that if you use the BBOX strategy, since the feature was already drawn it should remain the same when the map automatically pan/zoom to the feature's

Re: [OpenLayers-Users] Add Feature and Pan into View

2009-05-21 Thread soatley
Alexandre, Thanks for your reply. Can you explain the BBOX strategy a little more? It sounds like it will do the trick, but I am still new to OpenLayers. It sounds like the zoom level would change if I set the extent. (Or am I wrong?) I would just like it to pan, similar to how the Popup

[OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Jeremy Husmann
Hi everyone, Sorry if I have mailed the wrong list, or missed this completely in the documentation. First post. Im currently trying to figure out the best approach to have multiple vector layers selectable. From what I see I have two options: * Have one select control to manage

Re: [OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Christopher Schmidt
On Fri, May 22, 2009 at 09:56:07AM +1200, Jeremy Husmann wrote: Hi everyone, Sorry if I have mailed the wrong list, or missed this completely in the documentation. First post. Im currently trying to figure out the best approach to have multiple vector layers selectable.

Re: [OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Jeremy Husmann
Great, thanks for the Chris. I was looking in to the OpenLayers.Layer.Vector.RootContainer to see if I could use this, but was unsure if it would work? Or be displayed in the layer control as a option or not? Cheers, Jeremy -Original Message- From: Christopher Schmidt

Re: [OpenLayers-Users] Placing marker on map

2009-05-21 Thread Ramadoss
I got stuck with this problem for past 2 days trying to figure it out myselfbut nothing seems to be working as expected. there are couple of things that I tried myself 1. on every onClick event I try to redraw the map so that the marker put place where user clicked on the map after the

Re: [OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Christopher Schmidt
On Fri, May 22, 2009 at 10:20:55AM +1200, Jeremy Husmann wrote: Great, thanks for the Chris. I was looking in to the OpenLayers.Layer.Vector.RootContainer to see if I could use this, but was unsure if it would work? Or be displayed in the layer control as a option or not? It's used

Re: [OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Simo D
I succesfully used the 2.8 trunk. You can use SelectFeature with an array of layers as argument. Remember to add and activate the control after that the layers are added to the map, otherwise it don't work. Hope this helps. Simone Christopher Schmidt-2 wrote: On Fri, May 22, 2009 at

Re: [OpenLayers-Users] Multi Selectable Vector layers

2009-05-21 Thread Jeremy Husmann
Great, thanks Chris. I didn't realize the default chm was for 2.8 and not 2.7. I was getting very confused as to why my array was not being passed in. All sorted now. Cheers, Jeremy -Original Message- From: Christopher Schmidt [mailto:crschm...@metacarta.com] Sent: Friday, May 22,

[OpenLayers-Users] my text layer can't be seen sonetimes

2009-05-21 Thread sasi
There are 4 layers in my map. layer0 = Openlayers.Layer.image(...); isBaselayer=true; layer1 = Openlayers.Layer.WMS(...); layer2 = Openlayers.Layer.WMS(...); layer3 = Openlayers.Layer.text(...); I can only see the text layer sometimes, and can see the other 3 layers always. It's so strange! What