From joel.tremblet at openflyers.com Sat Aug 1 09:06:44 2009
From: joel.tremblet at openflyers.com (Joel Tremblet)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] [OL2.8]onPopupClose multiple layers
Message-ID: <20090801150644.7fbadextkw4wc8kw@webmail.openflyers.com>
Hi
Function to close a popup by clicking on closeBox seem to not working
on multiple layers
[CODE]
var selectControl = new OpenLayers.Control.SelectFeature([layer1, layer2]);
layer.events.on({
"featureselected" : onFeatureSelect,
"featureunselected" : onFeatureUnselect
});
map.addControl(selectControl);
selectControl.activate();
function onPopupClose(evt) {
selectControl.unselect(selectedFeature);
}
function onFeatureSelect(event) {
var feature = event.feature;
var selectedFeature = feature;
var popup = new OpenLayers.Popup.FramedCloud("chicken",
feature.geometry.getBounds().getCenterLonLat(),
new OpenLayers.Size(100,100),
"
"+feature.attributes.name + "
" +
feature.attributes.description,
null, true, onPopupClose
);
feature.popup = popup;
map.addPopup(popup);
}
function onFeatureUnselect(event) {
var feature = event.feature;
if(feature.popup) {
map.removePopup(feature.popup);
feature.popup.destroy();
delete feature.popup;
}
[/CODE]
Ticket 2197 opened http://trac.openlayers.org/ticket/2197
Is it confirmed?
--
Jo?l
-|-
----O----
| |
From n.e.kendall at gmail.com Sat Aug 1 11:12:36 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] since I'm a little dense...
Message-ID: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com>
Hi all,
I'm still trying to make a dynamic POI, or marker, or points layer, whatever
you want to call it, that changes the points in the map in response to
user's searches. I can't use mapserver or a pre-programmed server-side
option, so I'm forced to write my own gml or wkt. I'm still not quite sure
how to get this GML to OL and then replace it by the next search.
I think there are two options. One of which would be to send data to a
markers layer and have JS write the markers out. The other would be to have
php re-write the gml file on the server and theoretically, this should
create a new set of points each time the search is submitted. Not sure what
the best/easiest option would be with respect to coding (either on the
browser or server-side) or from a performance perspective. Does anyone have
any recommendations? I'm basically copying a php/mysql kml tutorial and
adapting it to GML (for largely ideological reasons). I've just re-read the
GML documentation, and it states that the GML is meant to only be loaded
once, so should I be focusing on a dynamic marker layer or what?
In effect, all I really want is a simple ajax function to load the
POI/markers that correspond to search criteria, such that every search
produces a unique (within a limited span of variation of course). The maps
centering won't really change, just the make up of the sites displayed in
the map. I can write the gml server side, and I can send the request, but
I'm not sure what to do with the call-back or how to feed that info to OL.
Thank you in advance for any advice/help.
(incidentally, I'd be willing to consider contracting someone to do this)
best,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090801/729156db/attachment.html
From n.e.kendall at gmail.com Sat Aug 1 12:27:40 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] data displays in wrong position,
after switch to Layer.Vector
Message-ID: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com>
Hi all,
I tried switching my application over from Layer.GML to Layer.Vector.
here's the original code which displayed in the correct place:
var sites = new OpenLayers.Layer.GML (
"Archaeological Sites", "data/siteswatr.gml",
{
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML,
}
);
Here's the modified code which displays in the S. Atlantic ocean.
var sites = new OpenLayers.Layer.Vector (
"Archaeological Sites", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "data/siteswatr.gml",
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
format: new OpenLayers.Format.GML(),
})
});
map.addLayer(sites);
I'm sure I messed something up, but what did I do wrong?
thanks,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090801/90693006/attachment.html
From eric.lemoine at camptocamp.com Sat Aug 1 16:04:20 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] data displays in wrong position,
after switch to Layer.Vector
In-Reply-To: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com>
References: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com>
Message-ID:
On Saturday, August 1, 2009, Nicholas Efremov-Kendall
wrote:
> Hi all,
> I tried switching my application over from Layer.GML to Layer.Vector.
> here's the original code which displayed in the correct place:
> var sites = new OpenLayers.Layer.GML (
> "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5},
> projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML,
> } );Here's the modified code which displays in the S. Atlantic ocean.
>
> var sites = new OpenLayers.Layer.Vector ( "Archaeological Sites", {
> ?? ? ? ? ? ? ? ? ? ?strategies: [new OpenLayers.Strategy.Fixed()],?? ? ? ? ? ? ? ? ? ?protocol: new OpenLayers.Protocol.HTTP({?? ? ? ? ? ? ? ? ? ? ? ?url: "data/siteswatr.gml",
> style: {pointRadius: 2.5},? projection: new OpenLayers.Projection("EPSG:4326"),
> ?? ? ? ? ? ? ? ? ? ? ? ?format: new OpenLayers.Format.GML(), })?? ? ? ? ? ? ? ?}); map.addLayer(sites);
>
> I'm sure I messed something up, but what did I do wrong?thanks,Nick
Hi. The projection should be set in the layer not in the protocol.
Cheers,
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From fmatz at nexgo.de Sun Aug 2 13:26:47 2009
From: fmatz at nexgo.de (fmatz)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] World Wind tiles of GeoCover 2000 - not
success
In-Reply-To: <1249045594139-3362489.post@n2.nabble.com>
References: <1249045594139-3362489.post@n2.nabble.com>
Message-ID: <1249234007168-3373311.post@n2.nabble.com>
Hello,
I think it was not so wrong, after playing with the zoom it works now :
var mapOptions = { maxResolution: 0.0703125, numZoomLevels: 12};
map = new OpenLayers.Map('map', mapOptions);
var ww2000 = new OpenLayers.Layer.WorldWind2( "GeoCover 2000",
"http://worldwind25.arc.nasa.gov/tile/tile.aspx?", 2.25, 6,
{T:"geocover2000"}, { tileSize: new OpenLayers.Size(512,512) });
map.addLayers([ww2000]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat( 14.374237060546875,
51.56848802548128 ), 7);
Best greetings
Friedhold
--
View this message in context: http://n2.nabble.com/World-Wind-tiles-of-GeoCover-2000---not-success-tp3362489p3373311.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From janmartin3 at googlemail.com Sun Aug 2 14:37:05 2009
From: janmartin3 at googlemail.com (Jan Martin)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] Popups for waypoints?
Message-ID: <4432d5020908021137n5b0d9646n92f41522028801f@mail.gmail.com>
Hello,
the file in this mail displays waypoints from a gpx file.
*
*Special features:
- auto-zoom
- auto-center
What do I need to change to get a popup when clicking a waypoint?
*
*The popup should show "name" and "desc".
Thanks,
Jan
Waypoints look like this:
170.555686000000010000000100000001
Page:
I want popups!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090802/533f0f54/attachment.html
From k_karo at web.de Sun Aug 2 15:26:38 2009
From: k_karo at web.de (moony)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] resizable div
Message-ID: <1249241198130-3373808.post@n2.nabble.com>
Hello,
The div element for the map object is resizable. I am updating the size with
map.updateSize().
But when I change the size of the div and the layer are reloading, I got the
error message "Requested Image is too big and can not be created".
How can I fix this problem?
Thanks!
--
View this message in context: http://n2.nabble.com/resizable-div-tp3373808p3373808.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From eric.lemoine at camptocamp.com Sun Aug 2 15:38:35 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] resizable div
In-Reply-To: <1249241198130-3373808.post@n2.nabble.com>
References: <1249241198130-3373808.post@n2.nabble.com>
Message-ID:
On Sun, Aug 2, 2009 at 9:26 PM, moony wrote:
>
> Hello,
>
> The div element for the map object is resizable. I am updating the size with
> map.updateSize().
> But when I change the size of the div and the layer are reloading, I got the
> error message "Requested Image is too big and can not be created".
>
> How can I fix this problem?
Hi. As I understand it this isn't a message from OpenLayers, but
rather from the map server. If you have control over this map server
you may want to check its configuration.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From petedawn at gmail.com Mon Aug 3 00:24:56 2009
From: petedawn at gmail.com (Peter Dawn)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif
icon in IE6
Message-ID: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com>
Hi everyone,
I am working on a Geoserver/OpenLayer web application. I need to test it in IE6.
Now I have a GetFeatureInfo function, where the user clicks on the map
and I do a GetFeatureInfo call and I display the results on the
screen.
The function is working well. However I want to display a animated GIF
wait icon, while its retrieving data. So I have the following,
icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset);
This displays the icon, but it does not animate. I am unable to figure
out why. Can somebody tell me what I need to get it to work. It works
fine in FF.
Thanks.
From adrian_gh.popa at romtelecom.ro Mon Aug 3 02:50:46 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] since I'm a little dense...
In-Reply-To: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com>
References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com>
Message-ID: <4A7688C6.1030200@romtelecom.ro>
Hello,
I had a similar task - of showing dynamic POIs and I chose to implement
it like this:
- a Vector layer with KML data.
- the path to the KML file is actually a path to a serverside script
wich generates KMLs.
- on searchbox submit a javascript creates new parameters for the
serverside script
- I force a layer refresh
It works great - but it tends to crash Internet Explorer after a while -
because IE keeps deleted markers in memory (silly behaviour). You can
get around this by refreshing the whole page, but it's nasty.
Let me know if you need some code examples.
Regards,
Adrian
Nicholas Efremov-Kendall wrote:
> Hi all,
>
> I'm still trying to make a dynamic POI, or marker, or points layer,
> whatever you want to call it, that changes the points in the map in
> response to user's searches. I can't use mapserver or a pre-programmed
> server-side option, so I'm forced to write my own gml or wkt. I'm
> still not quite sure how to get this GML to OL and then replace it by
> the next search.
>
> I think there are two options. One of which would be to send data to a
> markers layer and have JS write the markers out. The other would be to
> have php re-write the gml file on the server and theoretically, this
> should create a new set of points each time the search is submitted.
> Not sure what the best/easiest option would be with respect to coding
> (either on the browser or server-side) or from a performance
> perspective. Does anyone have any recommendations? I'm basically
> copying a php/mysql kml tutorial and adapting it to GML (for largely
> ideological reasons). I've just re-read the GML documentation, and it
> states that the GML is meant to only be loaded once, so should I be
> focusing on a dynamic marker layer or what?
>
> In effect, all I really want is a simple ajax function to load the
> POI/markers that correspond to search criteria, such that every search
> produces a unique (within a limited span of variation of course). The
> maps centering won't really change, just the make up of the sites
> displayed in the map. I can write the gml server side, and I can send
> the request, but I'm not sure what to do with the call-back or how to
> feed that info to OL.?
>
> Thank you in advance for any advice/help.
> (incidentally, I'd be willing to consider contracting someone to do this)
>
> best,
> Nick
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/5e647131/attachment.html
From adrian_gh.popa at romtelecom.ro Mon Aug 3 03:29:48 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] since I'm a little dense...
In-Reply-To: <05EC2644-0297-4807-BE5E-16974E51172F@gmail.com>
References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com>
<4A7688C6.1030200@romtelecom.ro>
<05EC2644-0297-4807-BE5E-16974E51172F@gmail.com>
Message-ID: <4A7691EC.7010909@romtelecom.ro>
Hello Nick,
Here's some code - it's not complete - because it mostly lacks variable
definitions which should be globals. However, they should be easy to add:
//layer definition
markers = new OpenLayers.Layer.Vector("Alarms", {
projection: map.displayProjection, strategies:
[new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.HTTP({ url:
"kml_alarms.pl", format: new OpenLayers.Format.KML({ extractStyles:
true, extractAttributes: true })})});
map.addLayer(markers);
//if you want to select the markers later, you will need to add
the necessary functions.
select = new OpenLayers.Control.SelectFeature(markers,
{toggle:true});
markers.events.on({ "featureselected": onMarkerSelect,
"featureunselected": onMarkerUnselect, "visibilitychanged":
onMarkerToggle });
map.addControl(select);
select.activate();
//.........
// onSubmit: - layer is the layer variable, options are the options
packed as a JSON/javascript object. Call refreshLayer like:
refreshLayer(markers, options);
function refreshLayer(layer, options){
if(options == null){
layer.refresh({force: true});
}
else{
if(layer.CLASS_NAME == "OpenLayers.Layer.Vector"){
layer.protocol.options.params = options; //override the
parameters sent to kml_alarms.pl
layer.refresh({force: true});
}
}
}
If you're using KML format, make sure your serverside script outputs
content-type application/vnd.google-earth.kml+xml. Something similar
should exist for GML.
From this code you're missing a function to pack the search form into
the "options" object. The object should look like:
options[name] = value;
options[name2] = value2;
Good luck!
Adrian.
P.S. If you intent your application to run for hours and to
automatically refresh your POIs, you should consider doing a full page
reload from time to time so that IE won't eat all available memory...
Nick Kendall wrote:
> Adrian, I'd love some code examples. I was toting with the idea of a
> gml writing php function that re-writes a gml file on the server, and
> reloading the pages on submit, thus changing the static resource but
> your way sounds more elegant
>
> Nicholas Efremov-Kendall
> (917) 399-6939
> Sent from my mobile device
>
> On Aug 3, 2009, at 9:50 AM, Adrian Popa > wrote:
>
>> Hello,
>>
>> I had a similar task - of showing dynamic POIs and I chose to
>> implement it like this:
>> - a Vector layer with KML data.
>> - the path to the KML file is actually a path to a serverside script
>> wich generates KMLs.
>> - on searchbox submit a javascript creates new parameters for the
>> serverside script
>> - I force a layer refresh
>>
>> It works great - but it tends to crash Internet Explorer after a
>> while - because IE keeps deleted markers in memory (silly behaviour).
>> You can get around this by refreshing the whole page, but it's nasty.
>>
>> Let me know if you need some code examples.
>> Regards,
>> Adrian
>>
>> Nicholas Efremov-Kendall wrote:
>>> Hi all,
>>>
>>> I'm still trying to make a dynamic POI, or marker, or points layer,
>>> whatever you want to call it, that changes the points in the map in
>>> response to user's searches. I can't use mapserver or a
>>> pre-programmed server-side option, so I'm forced to write my own gml
>>> or wkt. I'm still not quite sure how to get this GML to OL and then
>>> replace it by the next search.
>>>
>>> I think there are two options. One of which would be to send data to
>>> a markers layer and have JS write the markers out. The other would
>>> be to have php re-write the gml file on the server and
>>> theoretically, this should create a new set of points each time the
>>> search is submitted. Not sure what the best/easiest option would be
>>> with respect to coding (either on the browser or server-side) or
>>> from a performance perspective. Does anyone have any
>>> recommendations? I'm basically copying a php/mysql kml tutorial and
>>> adapting it to GML (for largely ideological reasons). I've just
>>> re-read the GML documentation, and it states that the GML is meant
>>> to only be loaded once, so should I be focusing on a dynamic marker
>>> layer or what?
>>>
>>> In effect, all I really want is a simple ajax function to load the
>>> POI/markers that correspond to search criteria, such that every
>>> search produces a unique (within a limited span of variation of
>>> course). The maps centering won't really change, just the make up of
>>> the sites displayed in the map. I can write the gml server side, and
>>> I can send the request, but I'm not sure what to do with the
>>> call-back or how to feed that info to OL.?
>>>
>>> Thank you in advance for any advice/help.
>>> (incidentally, I'd be willing to consider contracting someone to do
>>> this)
>>>
>>> best,
>>> Nick
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users@openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>
>>
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/648f7243/attachment.html
From eric.lemoine at camptocamp.com Mon Aug 3 03:42:06 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif
icon in IE6
In-Reply-To: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com>
References: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com>
Message-ID:
On Mon, Aug 3, 2009 at 6:24 AM, Peter Dawn wrote:
> Hi everyone,
>
> I am working on a Geoserver/OpenLayer web application. I need to test it in IE6.
>
> Now I have a GetFeatureInfo function, where the user clicks on the map
> and I do a GetFeatureInfo call and I display the results on the
> screen.
>
> The function is working well. However I want to display a animated GIF
> wait icon, while its retrieving data. So I have the following,
> icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset);
>
> This displays the icon, but it does not animate. I am unable to figure
> out why. Can somebody tell me what I need to get it to work. It works
> fine in FF.
Hi.
Just guessing... It may be that IE is busy parsing the GFI response.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From adrian_gh.popa at romtelecom.ro Mon Aug 3 03:54:08 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different
popup on click.
Message-ID: <4A7697A0.5030901@romtelecom.ro>
Hello everyone,
This is sort of a repeat message of "Re: [OpenLayers-Users]
Labels/Tooltips on mouse over a Vector layer" - but with a slightly
different idea.
Problem: I want to display a small div/popup with the marker's name when
the user hovers his mouse over the location, and I want to display a
bigger popup when the user actually clicks on the location.
Current status:
* I can use {hover: true} to register featureselected/featureunselected
when I hover over a marker instead on when I click on the maker.
* I haven't found any events that could differentiate between hover and
click
I'm thinking I could register my select control with hover: true and
allow featureselected to execute the same function for both when I click
on the makrer as well as when I hover over the marker. I would like to
know if there's any way to find out in the event inside the function if
the user clicked or not his mouse. Depending on this, I would show one
popup or the other.
Something like:
select = new OpenLayers.Control.SelectFeature(markers, {clickout:true,
hover:true});
markers.events.on({ "featureselected": onMarkerSelect,
"featureunselected": onMarkerUnselect, "visibilitychanged":
onMarkerToggle });
map.addControl(select);
select.activate();
function onMarkerSelect(event){
var feature = event.feature;
//find out if the user clicked or not
var clicked = event.*findAWayToSeeIfTheUserClicked()*;
if(clicked){
//show larger popup
}
else{
//show smaller popup
}
}
Suggestions are welcome.
Thanks,
Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/1e68bd67/attachment.html
From rohan at quintemri.com Mon Aug 3 04:00:32 2009
From: rohan at quintemri.com (maelstrom666)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] KML
Message-ID: <1249286432205-3376405.post@n2.nabble.com>
Hi I am very new to OL and I am having some issues with kml and markers.
When I go to
http://openlayers.org/dev/examples/sundials-spherical-mercator.html , the
sundials show up fine.
In the zip file I downloaded from the main website, this example was
included.
However I do not see the sundials on the example stored on my machine.
The code is exactly the same, the files are all in the right folders.. I am
not sure why it isnt working.
Do I need to install kml on my machine or something?
Also, I need some help with markers. I am currently using a google streets
layer on my map. When I add markers to it, no matter what lonlat I specify,
it will always show up at 0,0.
Thanks in advance,
Rohan Patel
--
View this message in context: http://n2.nabble.com/KML-tp3376405p3376405.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From adrian_gh.popa at romtelecom.ro Mon Aug 3 05:06:50 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] Overriding some default CSS values
Message-ID: <4A76A8AA.5030703@romtelecom.ro>
Hello,
I'm trying to change the transparency of the "FramedCloud" popup in
openlayers - to make it 90% opaque. Also, I'd like to change the font
color for the MousePosition control. I want to make these changes as
much as 'unintrusive' as possible - meaning I'd rather change these
values in my code instead of the original OpenLayers code, so that I may
upgrade openlayers in the future, without losing changes.
Any ideas on how I can do this?
Thanks,
Adrian
From petedawn at gmail.com Mon Aug 3 05:26:46 2009
From: petedawn at gmail.com (Peter Dawn)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif
icon in IE6
In-Reply-To:
References: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com>
Message-ID: <5dd88dab0908030226gebd3e06g177ed4504414dc75@mail.gmail.com>
Hi Eric,
You are probably right. Do you know of a workaround this. Why does IE
not render a GIF while processing the getfeatureinfo request. Perhaps
I can display text 'Please wait'.
Cheers.
On Mon, Aug 3, 2009 at 5:42 PM, Eric Lemoine wrote:
> On Mon, Aug 3, 2009 at 6:24 AM, Peter Dawn wrote:
>> Hi everyone,
>>
>> I am working on a Geoserver/OpenLayer web application. I need to test it in IE6.
>>
>> Now I have a GetFeatureInfo function, where the user clicks on the map
>> and I do a GetFeatureInfo call and I display the results on the
>> screen.
>>
>> The function is working well. However I want to display a animated GIF
>> wait icon, while its retrieving data. So I have the following,
>> icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset);
>>
>> This displays the icon, but it does not animate. I am unable to figure
>> out why. Can somebody tell me what I need to get it to work. It works
>> fine in FF.
>
> Hi.
>
> Just guessing... It may be that IE is busy parsing the GFI response.
>
> Cheers,
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
>
From jansen at terrestris.de Mon Aug 3 06:30:37 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:42 2010
Subject: [OpenLayers-Users] Overriding some default CSS values
In-Reply-To: <4A76A8AA.5030703@romtelecom.ro>
References: <4A76A8AA.5030703@romtelecom.ro>
Message-ID: <4A76BC4D.3090001@terrestris.de>
Hi Adrian,
to change the color of the mousecoordinates div, simply override the css
like:
(tested)
to set the opacity of one popup you could use:
popup.setOpacity(0.7);
(tested)
If you generally want to have another opacity issue:
OpenLayers.Popup.FramedCloud.prototype.opacity = 0.1;
(untested!)
before you instantiate your popups.
Regards,
Marc
Adrian Popa schrieb:
> Hello,
>
> I'm trying to change the transparency of the "FramedCloud" popup in
> openlayers - to make it 90% opaque. Also, I'd like to change the font
> color for the MousePosition control. I want to make these changes as
> much as 'unintrusive' as possible - meaning I'd rather change these
> values in my code instead of the original OpenLayers code, so that I may
> upgrade openlayers in the future, without losing changes.
>
> Any ideas on how I can do this?
>
> Thanks,
> Adrian
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
From adube at mapgears.com Mon Aug 3 08:12:04 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click.
In-Reply-To: <4A7697A0.5030901@romtelecom.ro>
References: <4A7697A0.5030901@romtelecom.ro>
Message-ID: <4A76D414.805@mapgears.com>
Hi Adrian,
Take a look at this example (1). You can use 2 SelectFeature controls
for what you need, one with hover:true and highlightOnly:true, the other
with hover false. The first one won't actually select the feature and
you can register 3 kinds of "highlight" events (see the source) to
display your small div/popup.
Hope this helps,
Alexandre
(1) http://openlayers.org/dev/examples/highlight-feature.html
Adrian Popa wrote:
> Hello everyone,
>
> This is sort of a repeat message of "Re: [OpenLayers-Users]
> Labels/Tooltips on mouse over a Vector layer" - but with a slightly
> different idea.
>
> Problem: I want to display a small div/popup with the marker's name
> when the user hovers his mouse over the location, and I want to
> display a bigger popup when the user actually clicks on the location.
>
> Current status:
> * I can use {hover: true} to register
> featureselected/featureunselected when I hover over a marker instead
> on when I click on the maker.
> * I haven't found any events that could differentiate between hover
> and click
>
> I'm thinking I could register my select control with hover: true and
> allow featureselected to execute the same function for both when I
> click on the makrer as well as when I hover over the marker. I would
> like to know if there's any way to find out in the event inside the
> function if the user clicked or not his mouse. Depending on this, I
> would show one popup or the other.
>
> Something like:
>
> select = new OpenLayers.Control.SelectFeature(markers, {clickout:true,
> hover:true});
> markers.events.on({ "featureselected": onMarkerSelect,
> "featureunselected": onMarkerUnselect, "visibilitychanged":
> onMarkerToggle });
> map.addControl(select);
> select.activate();
>
> function onMarkerSelect(event){
> var feature = event.feature;
> //find out if the user clicked or not
> var clicked = event.*findAWayToSeeIfTheUserClicked()*;
> if(clicked){
> //show larger popup
> }
> else{
> //show smaller popup
> }
> }
>
> Suggestions are welcome.
>
> Thanks,
> Adrian
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From adrian_gh.popa at romtelecom.ro Mon Aug 3 08:18:43 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Overriding some default CSS values
In-Reply-To: <4A76BC4D.3090001@terrestris.de>
References: <4A76A8AA.5030703@romtelecom.ro> <4A76BC4D.3090001@terrestris.de>
Message-ID: <4A76D5A3.70900@romtelecom.ro>
Hello Marc,
Your example for the mouse coordinates worked beautifully, thanks.
However, the "setOpacity" example didn't work (the opacity attribute
didn't change in Firebug). I've tried setting popup.opacity = 0.7 - and
although I've seen the change in firebug, my popup doesn't seem to honor it.
I'm running firefox 3.0.12.
I will do further tests to see what the problem might be.
Thanks,
Adrian
Marc Jansen wrote:
> Hi Adrian,
>
> to change the color of the mousecoordinates div, simply override the
> css like:
>
>
>
> (tested)
>
>
> to set the opacity of one popup you could use:
>
> popup.setOpacity(0.7);
>
> (tested)
>
>
> If you generally want to have another opacity issue:
>
> OpenLayers.Popup.FramedCloud.prototype.opacity = 0.1;
> (untested!)
>
> before you instantiate your popups.
>
> Regards,
> Marc
>
>
> Adrian Popa schrieb:
>> Hello,
>>
>> I'm trying to change the transparency of the "FramedCloud" popup in
>> openlayers - to make it 90% opaque. Also, I'd like to change the font
>> color for the MousePosition control. I want to make these changes as
>> much as 'unintrusive' as possible - meaning I'd rather change these
>> values in my code instead of the original OpenLayers code, so that I
>> may upgrade openlayers in the future, without losing changes.
>>
>> Any ideas on how I can do this?
>>
>> Thanks,
>> Adrian
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
From adrian_gh.popa at romtelecom.ro Mon Aug 3 08:19:44 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click.
In-Reply-To: <4A76D414.805@mapgears.com>
References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com>
Message-ID: <4A76D5E0.8090807@romtelecom.ro>
Thank you for your suggestion - I will try it and let you know how it works!
Regards,
Adrian
Alexandre Dube wrote:
> Hi Adrian,
>
> Take a look at this example (1). You can use 2 SelectFeature
> controls for what you need, one with hover:true and
> highlightOnly:true, the other with hover false. The first one won't
> actually select the feature and you can register 3 kinds of
> "highlight" events (see the source) to display your small div/popup.
>
> Hope this helps,
>
> Alexandre
>
> (1) http://openlayers.org/dev/examples/highlight-feature.html
>
> Adrian Popa wrote:
>> Hello everyone,
>>
>> This is sort of a repeat message of "Re: [OpenLayers-Users]
>> Labels/Tooltips on mouse over a Vector layer" - but with a slightly
>> different idea.
>>
>> Problem: I want to display a small div/popup with the marker's name
>> when the user hovers his mouse over the location, and I want to
>> display a bigger popup when the user actually clicks on the location.
>>
>> Current status:
>> * I can use {hover: true} to register
>> featureselected/featureunselected when I hover over a marker instead
>> on when I click on the maker.
>> * I haven't found any events that could differentiate between hover
>> and click
>>
>> I'm thinking I could register my select control with hover: true and
>> allow featureselected to execute the same function for both when I
>> click on the makrer as well as when I hover over the marker. I would
>> like to know if there's any way to find out in the event inside the
>> function if the user clicked or not his mouse. Depending on this, I
>> would show one popup or the other.
>>
>> Something like:
>>
>> select = new OpenLayers.Control.SelectFeature(markers,
>> {clickout:true, hover:true});
>> markers.events.on({ "featureselected": onMarkerSelect,
>> "featureunselected": onMarkerUnselect, "visibilitychanged":
>> onMarkerToggle });
>> map.addControl(select);
>> select.activate();
>>
>> function onMarkerSelect(event){
>> var feature = event.feature;
>> //find out if the user clicked or not
>> var clicked = event.*findAWayToSeeIfTheUserClicked()*;
>> if(clicked){
>> //show larger popup
>> }
>> else{
>> //show smaller popup
>> }
>> }
>>
>> Suggestions are welcome.
>>
>> Thanks,
>> Adrian
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
From crschmidt at metacarta.com Mon Aug 3 10:01:22 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] KML
In-Reply-To: <1249286432205-3376405.post@n2.nabble.com>
References: <1249286432205-3376405.post@n2.nabble.com>
Message-ID: <20090803140121.GA11258@metacarta.com>
On Mon, Aug 03, 2009 at 01:00:32AM -0700, maelstrom666 wrote:
>
> Hi I am very new to OL and I am having some issues with kml and markers.
> When I go to
> http://openlayers.org/dev/examples/sundials-spherical-mercator.html , the
> sundials show up fine.
> In the zip file I downloaded from the main website, this example was
> included.
> However I do not see the sundials on the example stored on my machine.
> The code is exactly the same, the files are all in the right folders.. I am
> not sure why it isnt working.
> Do I need to install kml on my machine or something?
Most likely:
* You're using a recent web browser, which does not support loading files
from the local filesystem.
* You havent' installed the examples on a webserver.
> Also, I need some help with markers. I am currently using a google streets
> layer on my map. When I add markers to it, no matter what lonlat I specify,
> it will always show up at 0,0.
Near 0,0, more likely. I recommend
http://docs.openlayers.org/library/spherical_mercator.html .
Regards,
--
Christopher Schmidt
MetaCarta
From Steve.Toutant at inspq.qc.ca Mon Aug 3 10:44:10 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Measure control problem
In-Reply-To: <4A718A57.8060107@mapgears.com>
Message-ID:
Hello,
I created a measure control based on the measure.js example
My measure control doesn't display the good distance. The distance is
longer than expected.
I tried with these coordinates
# : lat, long
Point 1 : 46.81509864093307, -71.22436522446064
Point 2 : 45.54483148742626, -73.63037108350094
The control gives 336.824 km
It should be around 233 km
Do you have an idea on what could be the cause of this error?
Here is my code
//the mapOptions of OL are
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher
les coord lat long
units: "m",
var mesureControl = new OpenLayers.Control.Measure(
OpenLayers.Handler.Path,
{
persist: true,
geodesic: false,
handlerOptions:
{
// layerOptions: {styleMap: styleMap}
}
}
);
mesureControl.events.on
({
"measure": handleMeasurements,
"measurepartial": handleMeasurements
});
map.addControl(mesureControl);
function handleMeasurements(event)
{
var geometry = event.geometry;
var units = event.units;
var measure = event.measure;
alert( measure.toFixed(3) + " " + units, "" );
}
//geoExt toolbar
action = new GeoExt.Action({
control: mesureControl,
map: map,
toggleGroup: "map",
iconCls: 'measure',
tooltip: 'Mesure lin?aire'
});
toolbar.push(action);
Thanks for your help,
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/41764730/attachment.html
From kwonghu at hotmail.com Mon Aug 3 10:47:52 2009
From: kwonghu at hotmail.com (Kwong Hu Kiu)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Measure control problem
In-Reply-To:
References: <4A718A57.8060107@mapgears.com>
Message-ID:
I think you are looking for the Vincenty distance formula.
It's included in the examples as well.
To: users@openlayers.org
From: Steve.Toutant@inspq.qc.ca
Date: Mon, 3 Aug 2009 10:44:10 -0400
Subject: [OpenLayers-Users] Measure control problem
Hello,
I created a measure control based on
the measure.js example
My measure control doesn't display the
good distance. The distance is longer than expected.
I tried with these coordinates
# : lat, long
Point 1 : 46.81509864093307, -71.22436522446064
Point 2 : 45.54483148742626, -73.63037108350094
The control gives 336.824 km
It should be around 233 km
Do you have an idea on what could be
the cause of this error?
Here is my code
//the mapOptions of OL are
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326"),
//Pour afficher les coord lat long
units: "m",
var mesureControl = new OpenLayers.Control.Measure(
OpenLayers.Handler.Path,
{
persist:
true,
geodesic: false,
handlerOptions:
{
//
layerOptions: {styleMap: styleMap}
}
}
);
mesureControl.events.on
({
"measure": handleMeasurements,
"measurepartial":
handleMeasurements
});
map.addControl(mesureControl);
function handleMeasurements(event)
{
var
geometry = event.geometry;
var
units = event.units;
var
measure = event.measure;
alert(
measure.toFixed(3) + " " + units, "" );
}
//geoExt toolbar
action = new GeoExt.Action({
control:
mesureControl,
map: map,
toggleGroup: "map",
iconCls:
'measure',
tooltip:
'Mesure lin?aire'
});
toolbar.push(action);
Thanks for your help,
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/c9db9c3c/attachment.html
From Steve.Toutant at inspq.qc.ca Mon Aug 3 11:01:20 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Measure control problem
In-Reply-To:
Message-ID:
No, I need planar distance since my map is in Mercator projection.
I provided The coordinates of point 1 and point 2 in lat/long just for
test purpose.
Sorry for the confusion.
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
Kwong Hu Kiu
03/08/2009 10:47 AM
A
,
cc
Objet
RE: [OpenLayers-Users] Measure control problem
I think you are looking for the Vincenty distance formula.
It's included in the examples as well.
To: users@openlayers.org
From: Steve.Toutant@inspq.qc.ca
Date: Mon, 3 Aug 2009 10:44:10 -0400
Subject: [OpenLayers-Users] Measure control problem
Hello,
I created a measure control based on the measure.js example
My measure control doesn't display the good distance. The distance is
longer than expected.
I tried with these coordinates
# : lat, long
Point 1 : 46.81509864093307, -71.22436522446064
Point 2 : 45.54483148742626, -73.63037108350094
The control gives 336.824 km
It should be around 233 km
Do you have an idea on what could be the cause of this error?
Here is my code
//the mapOptions of OL are
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher
les coord lat long
units: "m",
var mesureControl = new OpenLayers.Control.Measure(
OpenLayers.Handler.Path,
{
persist: true,
geodesic: false,
handlerOptions:
{
// layerOptions: {styleMap: styleMap}
}
}
);
mesureControl.events.on
({
"measure": handleMeasurements,
"measurepartial": handleMeasurements
});
map.addControl(mesureControl);
function handleMeasurements(event)
{
var geometry = event.geometry;
var units = event.units;
var measure = event.measure;
alert( measure.toFixed(3) + " " + units, "" );
}
//geoExt toolbar
action = new GeoExt.Action({
control: mesureControl,
map: map,
toggleGroup: "map",
iconCls: 'measure',
tooltip: 'Mesure lin?aire'
});
toolbar.push(action);
Thanks for your help,
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3 T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/4e7ef749/attachment.html
From Steve.Toutant at inspq.qc.ca Mon Aug 3 11:53:51 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Measure control problem (SOLVED)
In-Reply-To:
Message-ID:
Setting geodesic: true fixed it.
I misunderstood this property.
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
Steve Toutant/INSPQ/SSSS
03/08/2009 11:01 AM
A
Kwong Hu Kiu
cc
users@openlayers.org
Objet
RE: [OpenLayers-Users] Measure control problem
No, I need planar distance since my map is in Mercator projection.
I provided The coordinates of point 1 and point 2 in lat/long just for
test purpose.
Sorry for the confusion.
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
Kwong Hu Kiu
03/08/2009 10:47 AM
A
,
cc
Objet
RE: [OpenLayers-Users] Measure control problem
I think you are looking for the Vincenty distance formula.
It's included in the examples as well.
To: users@openlayers.org
From: Steve.Toutant@inspq.qc.ca
Date: Mon, 3 Aug 2009 10:44:10 -0400
Subject: [OpenLayers-Users] Measure control problem
Hello,
I created a measure control based on the measure.js example
My measure control doesn't display the good distance. The distance is
longer than expected.
I tried with these coordinates
# : lat, long
Point 1 : 46.81509864093307, -71.22436522446064
Point 2 : 45.54483148742626, -73.63037108350094
The control gives 336.824 km
It should be around 233 km
Do you have an idea on what could be the cause of this error?
Here is my code
//the mapOptions of OL are
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher
les coord lat long
units: "m",
var mesureControl = new OpenLayers.Control.Measure(
OpenLayers.Handler.Path,
{
persist: true,
geodesic: false,
handlerOptions:
{
// layerOptions: {styleMap: styleMap}
}
}
);
mesureControl.events.on
({
"measure": handleMeasurements,
"measurepartial": handleMeasurements
});
map.addControl(mesureControl);
function handleMeasurements(event)
{
var geometry = event.geometry;
var units = event.units;
var measure = event.measure;
alert( measure.toFixed(3) + " " + units, "" );
}
//geoExt toolbar
action = new GeoExt.Action({
control: mesureControl,
map: map,
toggleGroup: "map",
iconCls: 'measure',
tooltip: 'Mesure lin?aire'
});
toolbar.push(action);
Thanks for your help,
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3 T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/44a716b6/attachment.html
From n.e.kendall at gmail.com Mon Aug 3 12:54:31 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] since I'm a little dense...
In-Reply-To: <4A7691EC.7010909@romtelecom.ro>
References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com>
<4A7688C6.1030200@romtelecom.ro>
<05EC2644-0297-4807-BE5E-16974E51172F@gmail.com>
<4A7691EC.7010909@romtelecom.ro>
Message-ID: <33fd44f90908030954p4a3d2053yeb98720a25256b1e@mail.gmail.com>
Adrian,
Thanks a lot! (you've also inadvertently answered another question of mine).
I was considering trying to implement something similar, but with having
php-reload the page on submit, thus changing the static GML resource when
the page refreshed. I think the javascript option is a little bit more
elegant and will probably work better with my page structure (I'm switching
the body html with a php array).
Essentially, I'm re-writing one of the KML export tutorials off of the web,
I've fudged it for now with 'Content-type: application/opengis.net/gml+xml'
which I'm sure is wrong (I'm going to test it today), so if someone has any
experience with writing their own gml, or manipulating it I'd also be very
grateful for any suggestions on how to structure this bit here.
No, essentially, I don't expect particularly high-volume or prolonged use (I
also don't have tons of features).
On Mon, Aug 3, 2009 at 10:29 AM, Adrian Popa
wrote:
> Hello Nick,
>
> Here's some code - it's not complete - because it mostly lacks variable
> definitions which should be globals. However, they should be easy to add:
>
> //layer definition
> markers = new OpenLayers.Layer.Vector("Alarms", {
> projection: map.displayProjection, strategies: [new
> OpenLayers.Strategy.BBOX()],
> protocol: new OpenLayers.Protocol.HTTP({ url:
> "kml_alarms.pl", format: new OpenLayers.Format.KML({ extractStyles: true,
> extractAttributes: true })})});
> map.addLayer(markers);
>
> //if you want to select the markers later, you will need to add the
> necessary functions.
> select = new OpenLayers.Control.SelectFeature(markers,
> {toggle:true});
> markers.events.on({ "featureselected": onMarkerSelect,
> "featureunselected": onMarkerUnselect, "visibilitychanged": onMarkerToggle
> });
> map.addControl(select);
> select.activate();
>
> //.........
> // onSubmit: - layer is the layer variable, options are the options packed
> as a JSON/javascript object. Call refreshLayer like: refreshLayer(markers,
> options);
>
> function refreshLayer(layer, options){
>
> if(options == null){
> layer.refresh({force: true});
> }
> else{
> if(layer.CLASS_NAME == "OpenLayers.Layer.Vector"){
> layer.protocol.options.params = options; //override the
> parameters sent to kml_alarms.pl
> layer.refresh({force: true});
> }
> }
> }
>
> If you're using KML format, make sure your serverside script outputs
> content-type application/vnd.google-earth.kml+xml. Something similar should
> exist for GML.
> From this code you're missing a function to pack the search form into the
> "options" object. The object should look like:
> options[name] = value;
> options[name2] = value2;
>
>
> Good luck!
> Adrian.
>
> P.S. If you intent your application to run for hours and to automatically
> refresh your POIs, you should consider doing a full page reload from time to
> time so that IE won't eat all available memory...
>
>
>
> Nick Kendall wrote:
>
> Adrian, I'd love some code examples. I was toting with the idea of a gml
> writing php function that re-writes a gml file on the server, and reloading
> the pages on submit, thus changing the static resource but your way sounds
> more elegant
>
> Nicholas Efremov-Kendall (917) 399-6939
> Sent from my mobile device
>
> On Aug 3, 2009, at 9:50 AM, Adrian Popa
> wrote:
>
> Hello,
>
> I had a similar task - of showing dynamic POIs and I chose to implement it
> like this:
> - a Vector layer with KML data.
> - the path to the KML file is actually a path to a serverside script wich
> generates KMLs.
> - on searchbox submit a javascript creates new parameters for the
> serverside script
> - I force a layer refresh
>
> It works great - but it tends to crash Internet Explorer after a while -
> because IE keeps deleted markers in memory (silly behaviour). You can get
> around this by refreshing the whole page, but it's nasty.
>
> Let me know if you need some code examples.
> Regards,
> Adrian
>
> Nicholas Efremov-Kendall wrote:
>
> Hi all,
>
> I'm still trying to make a dynamic POI, or marker, or points layer,
> whatever you want to call it, that changes the points in the map in response
> to user's searches. I can't use mapserver or a pre-programmed server-side
> option, so I'm forced to write my own gml or wkt. I'm still not quite sure
> how to get this GML to OL and then replace it by the next search.
>
> I think there are two options. One of which would be to send data to a
> markers layer and have JS write the markers out. The other would be to have
> php re-write the gml file on the server and theoretically, this should
> create a new set of points each time the search is submitted. Not sure what
> the best/easiest option would be with respect to coding (either on the
> browser or server-side) or from a performance perspective. Does anyone have
> any recommendations? I'm basically copying a php/mysql kml tutorial and
> adapting it to GML (for largely ideological reasons). I've just re-read the
> GML documentation, and it states that the GML is meant to only be loaded
> once, so should I be focusing on a dynamic marker layer or what?
>
> In effect, all I really want is a simple ajax function to load the
> POI/markers that correspond to search criteria, such that every search
> produces a unique (within a limited span of variation of course). The maps
> centering won't really change, just the make up of the sites displayed in
> the map. I can write the gml server side, and I can send the request, but
> I'm not sure what to do with the call-back or how to feed that info to OL.?
>
> Thank you in advance for any advice/help.
> (incidentally, I'd be willing to consider contracting someone to do this)
>
> best,
> Nick
>
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>
>
>
> --
> ---
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/76085198/attachment.html
From n.e.kendall at gmail.com Mon Aug 3 13:13:50 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Problem with Layer.vector
Message-ID: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
Hi all,
I've been trying to implement my gml as a layer.vector, as opposed to a
layer.gml. I'm loading both into the browser with the different methods, and
I can from firebug that the file is getting loaded, but it's not being
displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't
center at all. I'm not sure what going wrong here, I thought I'd followed
the examples pretty closely. Thanks (again) in advance.
//loads fine
var sites = new OpenLayers.Layer.GML (
"Archaeological Sites", "data/siteswatr.gml",
{
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML,
}
);
map.addLayer(sites);
// loads into browser but not displayed.
var sites2 = new OpenLayers.Layer.Vector (
"sites2", {projection: map.displayProjection, strategies: [new
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url:
"data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});
map.addLayer(sites2);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/955b5127/attachment.html
From n.e.kendall at gmail.com Mon Aug 3 13:35:10 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] also strange vector behavior (obviously I've
messed up)
Message-ID: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
Hi all,
Not sure what's going on here, and what/why I'm doing wrong.
I'm loading successfully a gml layer which isn't displaying in the right
place
var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
{
style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
}
);
when I add projection and format criteria, it doesn't display at all, let
alone in the wrong place, and the auto map.setCenter function doesn't work.
var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
{
style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML,
}
);
Is there anything really obvious that I'm missing? thanks again, in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/441f0e05/attachment.html
From crschmidt at metacarta.com Mon Aug 3 13:54:32 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] also strange vector behavior (obviously I've
messed up)
In-Reply-To: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
Message-ID: <20090803175432.GD11258@metacarta.com>
On Mon, Aug 03, 2009 at 08:35:10PM +0300, Nicholas Efremov-Kendall wrote:
> Hi all,
> Not sure what's going on here, and what/why I'm doing wrong.
> I'm loading successfully a gml layer which isn't displaying in the right
> place
> var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> {
> style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> }
> );
>
> when I add projection and format criteria, it doesn't display at all, let
> alone in the wrong place, and the auto map.setCenter function doesn't work.
> var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> {
> style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> projection: new OpenLayers.Projection("EPSG:4326"),
> format: OpenLayers.Format.GML,
> }
> );
>
> Is there anything really obvious that I'm missing? thanks again, in advance
Are you using IE? If so, the trailing ',' after format will fail.
Do you have a debugger/error reporting turned on? Check these things first
for errors.
Otherwise:
http://docs.openlayers.org/help/minimize.html
Regards,
--
Christopher Schmidt
MetaCarta
From n.e.kendall at gmail.com Mon Aug 3 13:56:51 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] also strange vector behavior (obviously I've
messed up)
In-Reply-To: <20090803175432.GD11258@metacarta.com>
References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
<20090803175432.GD11258@metacarta.com>
Message-ID: <33fd44f90908031056w7006b447u6e9773d262917749@mail.gmail.com>
Firebug doesn't pick anything up.
On Mon, Aug 3, 2009 at 8:54 PM, Christopher Schmidt wrote:
> On Mon, Aug 03, 2009 at 08:35:10PM +0300, Nicholas Efremov-Kendall wrote:
> > Hi all,
> > Not sure what's going on here, and what/why I'm doing wrong.
> > I'm loading successfully a gml layer which isn't displaying in the right
> > place
> > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> > {
> > style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> > }
> > );
> >
> > when I add projection and format criteria, it doesn't display at all, let
> > alone in the wrong place, and the auto map.setCenter function doesn't
> work.
> > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> > {
> > style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> > projection: new OpenLayers.Projection("EPSG:4326"),
> > format: OpenLayers.Format.GML,
> > }
> > );
> >
> > Is there anything really obvious that I'm missing? thanks again, in
> advance
>
> Are you using IE? If so, the trailing ',' after format will fail.
> Do you have a debugger/error reporting turned on? Check these things first
> for errors.
>
> Otherwise:
> http://docs.openlayers.org/help/minimize.html
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/aed5baa9/attachment.html
From hagen1113 at yahoo.com Mon Aug 3 17:41:51 2009
From: hagen1113 at yahoo.com (Raul David Orozco)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Zoom Level and Base Layer problem
Message-ID: <183064.49106.qm@web51412.mail.re2.yahoo.com>
Hi. I?m dealing with an issue? and I'm out of ideas right now.
I've a layer created in my own WMS server, this layer is built with data from some part of my city of residence, but when I load the layer with OL, the zoom level is very far away, because of that my map looks like a tiny black dot, so I have to do zoom a lot of times to actually see something. I need to know how to set the initial zoom level. Here's the code I'm using to create the Layer.
?Layer = new OpenLayers.Layer.WMS( layer.name,
??????????????????????????????????????????? "http://192.168.1.5:9090/smms/wms.php",
??????????????????????????????????????????? {'layers': layer.name, format: "image/png"},
??????????????????????????????????????????? { MinExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273),
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? MaxExtent: new OpenLayers.Bounds(-180,-90,180,90),
???????????????????????????????????????????? maxResolution: "auto"});
"This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain inside all the graphic I want to show in the initial zoom level ".? I used ZoomtoMaExtent but I get an error of "bounds is null". Thanks.
____________________________________________________________________________________
?Obt?n la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8.
http://downloads.yahoo.com/ieak8/?l=e1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/3fc42b0d/attachment.html
From jansen at terrestris.de Mon Aug 3 17:58:27 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Zoom Level and Base Layer problem
In-Reply-To: <183064.49106.qm@web51412.mail.re2.yahoo.com>
References: <183064.49106.qm@web51412.mail.re2.yahoo.com>
Message-ID: <4A775D83.8000500@terrestris.de>
Hi Raul,
just a guess: JavaScript / OpenLayers is case sensitive, so first you
would need to write:
minExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273),
maxExtent: new OpenLayers.Bounds(-180,-90,180,90)
Then you could set min- and max extent on the map-object as well, e.g.:
var map = new OpenLayers.Map('map', {
minExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273),
maxExtent: new OpenLayers.Bounds(-180,-90,180,90)
});
Afterwards you could issue:
map.zoomToExtent( map.getMinExtent() );
To zoom to a specific zoom level use
map.zoomTo( yourZoomLevel );
maybe you only need to set the center of the map and an appropriate
zoomleve like so:
map.setCenter(lonlatObj, zoomlevel);
BTW a map.zoomToMaxExtent would zoom to the extent of whole world.
Regards,
Marc Jansen
Raul David Orozco schrieb:
> Hi. I?m dealing with an issue and I'm out of ideas right now.
>
> I've a layer created in my own WMS server, this layer is built with
> data from some part of my city of residence, but when I load the layer
> with OL, the zoom level is very far away, because of that my map looks
> like a tiny black dot, so I have to do zoom a lot of times to actually
> see something. I need to know how to set the initial zoom level.
> Here's the code I'm using to create the Layer.
>
> Layer = new OpenLayers.Layer.WMS( layer.name,
>
> "http://192.168.1.5:9090/smms/wms.php",
> {'layers': layer.name,
> format: "image/png"},
> { MinExtent: new
> OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273),
> MaxExtent: new
> OpenLayers.Bounds(-180,-90,180,90),
> maxResolution: "auto"});
>
> "This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain
> inside all the graphic I want to show in the initial zoom level ". I
> used ZoomtoMaExtent but I get an error of "bounds is null". Thanks.
>
>
> ------------------------------------------------------------------------
>
> ?Obt?n la mejor experiencia en la web!
> Descarga gratis el nuevo Internet Explorer 8
> http://downloads.yahoo.com/ieak8/?l=e1
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From n.e.kendall at gmail.com Mon Aug 3 18:03:28 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Zoom Level and Base Layer problem
In-Reply-To: <183064.49106.qm@web51412.mail.re2.yahoo.com>
References: <183064.49106.qm@web51412.mail.re2.yahoo.com>
Message-ID: <33fd44f90908031503w1635fed8o36f2d9af11df91d@mail.gmail.com>
Hi,
You can either specify the zoom level in your map options and drop the
zoomtomaxextent, or once you've loaded data, you a map.centerfunction set on
whatever data you load.
best,
N
e.g.
if( ! map.getCenter() ){
sites2.events.register('loadend', sites2,
function(){map.zoomToExtent(sites2.getDataExtent())});
map.setCenter(null, null);
};
}
or
map = new OpenLayers.Map ("map",
{
controls:[
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Attribution()],
sphericalMercator: true,
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0399,
numZoomLevels: 19,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
and then specify a specific lon-lat for your map center, and a zoom level in
your variables (e.g var zoom = 2, var lat=x var lon=y) and then
map.setCenter(lon, lat, zoom)
On Tue, Aug 4, 2009 at 12:41 AM, Raul David Orozco wrote:
> Hi. I?m dealing with an issue and I'm out of ideas right now.
>
> I've a layer created in my own WMS server, this layer is built with data
> from some part of my city of residence, but when I load the layer with OL,
> the zoom level is very far away, because of that my map looks like a tiny
> black dot, so I have to do zoom a lot of times to actually see something. I
> need to know how to set the initial zoom level. Here's the code I'm using to
> create the Layer.
>
> Layer = new OpenLayers.Layer.WMS( layer.name,
> "
> http://192.168.1.5:9090/smms/wms.php",
> {'layers': layer.name, format:
> "image/png"},
> { MinExtent: new
> OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273),
> MaxExtent: new
> OpenLayers.Bounds(-180,-90,180,90),
> maxResolution: "auto"});
>
> "This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain inside
> all the graphic I want to show in the initial zoom level ". I used
> ZoomtoMaExtent but I get an error of "bounds is null". Thanks.
>
> ------------------------------
>
> ?Obt?n la mejor experiencia en la web!
> Descarga gratis el nuevo Internet Explorer 8
> http://downloads.yahoo.com/ieak8/?l=e1
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/6e76f3cf/attachment.html
From n.e.kendall at gmail.com Mon Aug 3 23:16:45 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Issues with layers
Message-ID: <33fd44f90908032016j737fbb83lc1e9d3b1ce2933cc@mail.gmail.com>
Hi all,
As before I'm having some problems with some of my GML layers. In
particular, I'm trying to display three vector overlays, one of which is
meant to be a dynamic POI, but that's another story.
The issue is this: Only one of my layers "sites" is displaying correctly.
The topo layer only displays at all, and in the wrong place if I specify
only the style option. If I specify the projection or format option with the
same syntax as I do for the points layer, I can see in firebug that the
layer get's loaded into the browser but if I set the map.getCenter function
on the layer, it doesn't center at all, and zooms to what I assume is the
max extent.
e.g.
//works
var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
{
style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
}
);
//doesn't
var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
{
style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML
}
);
I've stripped out the select controls and popups, and the script works,
centers, and displays the one layer (sites) over wms baselayers correctly.
Additionally, I've been trying to implement the layer.vector for the same
layer as sites (sites2), which also get's loaded into the browser, but
doesn't center if targeted by the map.getCenter function. Essentially, the
same behavior as the quirky GML layers (i.e. get's loaded into the browser,
but doesn't display or if it is displayed is not responsive to the
map.getCenter function). I've tested each of these GML layers in ArcGIS and
they display in the correct alignment. Additionally, the (sites) layer
displays as Black seemingly without my having specified a color. Here is the
bare minimum code of the script. I know this is kind of long, but I've added
line breaks for clarity. As always, any help is greatly appreciated
best,
N
//
function init() {
map = new OpenLayers.Map ("map",
{
controls:[
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Attribution()],
sphericalMercator: true,
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0399,
numZoomLevels: 19,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
}
);
var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
{
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML});
map.addLayer(topo);
var sites = new OpenLayers.Layer.GML (
"Archaeological Sites", "data/siteswatr.gml",
{
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML
}
);
map.addLayer(sites);
var sites2 = new OpenLayers.Layer.Vector (
"sites2", {projection: map.displayProjection, strategies: [new
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url:
"data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});
map.addLayer(sites2);
if( ! map.getCenter() ){
sites.events.register('loadend', sites,
function(){map.zoomToExtent(sites.getDataExtent())});
map.setCenter(null, null);
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/aaac1245/attachment.html
From eric.lemoine at camptocamp.com Tue Aug 4 00:37:01 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] also strange vector behavior (obviously I've
messed up)
In-Reply-To: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
Message-ID:
On Monday, August 3, 2009, Nicholas Efremov-Kendall
wrote:
> Hi all,
> Not sure what's going on here, and what/why I'm doing wrong.I'm loading successfully a gml layer which isn't displaying in the right placevar topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> ? {
> ? style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> ? }
> ? );
>
> when I add projection and format criteria, it doesn't display at all, let alone in the wrong place, and the auto map.setCenter function doesn't work.
> ?var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> ? {
> ? style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> ? projection: new OpenLayers.Projection("EPSG:4326"),
> ? format: OpenLayers.Format.GML,
> ? }
> ? );
>
> Is there anything really obvious that I'm missing? thanks again, in advance
Hi
What's the coordinates system of your data? The fact that it does
display when you don't set "projection" to 4326 makes me think your
data is not 4326.
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From eric.lemoine at camptocamp.com Tue Aug 4 00:47:47 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Problem with Layer.vector
In-Reply-To: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
Message-ID:
On Monday, August 3, 2009, Nicholas Efremov-Kendall
wrote:
> Hi all,I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance.
> //loads fine?var sites = new OpenLayers.Layer.GML (
> ? "Archaeological Sites", "data/siteswatr.gml",
> ? {
> ? style: {pointRadius: 2.5},
> ? projection: new OpenLayers.Projection("EPSG:4326"),
> ? format: OpenLayers.Format.GML,
> ? }
> ? );
> ? map.addLayer(sites);
> ?// loads into browser but not displayed.
> ? var sites2 = new OpenLayers.Layer.Vector (
> ? "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});
> ? map.addLayer(sites2);
Your code looks correct to me. The Fixed strategy empties the layer
before adding features into it, which could explain why you see one
set of features only. I'd recommend adding a break point in the fixed
strategy's merge() method to understand what's going on.
>
>
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From n.e.kendall at gmail.com Tue Aug 4 04:41:23 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] also strange vector behavior (obviously I've
messed up)
In-Reply-To:
References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com>
Message-ID: <33fd44f90908040141j150516e7y3355db4b0516d20f@mail.gmail.com>
Hi Eric,
It displays, but incorrorectly (offset by some factor I haven't checked,
down and to the left by a country or so). I manually reprojected the data
using GDAL from a shapefile originally collected in UTM. I've checked the
GML it does say it's in 4326. Regardless of the projection, why doesn't the
map.getCenter function work on that file? do you think it has to do with the
GML itself?
On Tue, Aug 4, 2009 at 7:37 AM, Eric Lemoine wrote:
> On Monday, August 3, 2009, Nicholas Efremov-Kendall
> wrote:
> > Hi all,
> > Not sure what's going on here, and what/why I'm doing wrong.I'm loading
> successfully a gml layer which isn't displaying in the right placevar topo =
> new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> > {
> > style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> > }
> > );
> >
> > when I add projection and format criteria, it doesn't display at all, let
> alone in the wrong place, and the auto map.setCenter function doesn't work.
> > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml",
> > {
> > style: {strokeWidth: 1, strokeColor:"#CCCCCC"},
> > projection: new OpenLayers.Projection("EPSG:4326"),
> > format: OpenLayers.Format.GML,
> > }
> > );
> >
> > Is there anything really obvious that I'm missing? thanks again, in
> advance
>
> Hi
>
> What's the coordinates system of your data? The fact that it does
> display when you don't set "projection" to 4326 makes me think your
> data is not 4326.
>
>
> >
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/07f8dced/attachment.html
From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:32:27 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
Message-ID: <4A780E3B.2020905@romtelecom.ro>
Hello,
I'm running into a problem where firebug says "element doesn't exist"
somewhere in OpenLayers code. I'm having trouble debugging this issue,
because my Openlayers code is pretty compact. What should I include in
to have OpenLayers with a more readable code? Is there an intermediary
file with formatting preserved which I could use temporarly?
Thanks,
Adrian
From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:52:05 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
In-Reply-To: <4A780FB2.6050201@terrestris.de>
References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de>
Message-ID: <4A7812D5.8080500@romtelecom.ro>
Thanks, I hadn't noticed that copy. :)
Marc Jansen wrote:
> Hi Adrian,
>
> assuming you are using a local copy of OpenLayers, you could use
>
> OpenLayers-Folder/lib/OpenLayers.js
>
> instead of
>
> OpenLayers-Folder/OpenLayers.js
>
> which would load lots of uncompressed/non-minimized js-files.
>
> Regards,
> Marc
>
>
> Adrian Popa schrieb:
>> Hello,
>>
>> I'm running into a problem where firebug says "element doesn't exist"
>> somewhere in OpenLayers code. I'm having trouble debugging this
>> issue, because my Openlayers code is pretty compact. What should I
>> include in to have OpenLayers with a more readable code? Is there an
>> intermediary file with formatting preserved which I could use
>> temporarly?
>>
>> Thanks,
>> Adrian
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:57:56 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
In-Reply-To: <4A780FB2.6050201@terrestris.de>
References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de>
Message-ID: <4A781434.5050102@romtelecom.ro>
Hello Marc,
I spoke too soon. If I use that file, I get ~34 errors in Firebug all
complaining that "OpenLayers.Layer is undefined" in various js files. It
seems something doesn't load properly.
I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/
directory on my web server. My page loads it like:
Any ideas?
Adrian
Marc Jansen wrote:
> Hi Adrian,
>
> assuming you are using a local copy of OpenLayers, you could use
>
> OpenLayers-Folder/lib/OpenLayers.js
>
> instead of
>
> OpenLayers-Folder/OpenLayers.js
>
> which would load lots of uncompressed/non-minimized js-files.
>
> Regards,
> Marc
>
>
> Adrian Popa schrieb:
>> Hello,
>>
>> I'm running into a problem where firebug says "element doesn't exist"
>> somewhere in OpenLayers code. I'm having trouble debugging this
>> issue, because my Openlayers code is pretty compact. What should I
>> include in to have OpenLayers with a more readable code? Is there an
>> intermediary file with formatting preserved which I could use
>> temporarly?
>>
>> Thanks,
>> Adrian
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
From richard.wiesinger at gmail.com Tue Aug 4 07:08:44 2009
From: richard.wiesinger at gmail.com (Richard Wiesinger)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] right mouse click not working in chrome & safari
Message-ID:
Hi,
I defined a callback function for right mouse clicks like this:
map.controls.Navigation.handlers.click.callbacks.rightclick = function(evt)
{
alert('right mouse click');
}
This works perfectly for FF and IE, but in Chrome and Safari nothing
happens.
Am I doing something wrong? Is there a way to support these browsers?
Kind regards,
richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/bf1a049b/attachment.html
From lorenzetti at gis3w.it Tue Aug 4 07:36:37 2009
From: lorenzetti at gis3w.it (Walter Lorenzetti)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select feature for destroy a function
Message-ID: <4A781D45.6020504@gis3w.it>
Hi All,
for delete(destroy) a feature I use a SelectFeature Control where
onSelect event I destroy the feature...:
OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat});
on IG.actions.confRemoveFeat I use a confirm dialog box for feature
deleting...
on 'Yes' option I destroy the feature but on 'No' option I've a problem.
The problem is that the feature is highlighted again.. so for to
unhighlight the feature I've to click outside it...
I didn't find a method to unselect the feature by a method... on 'No'
Someone can help me?
Sorry for my bad english
Thanks in advance
Walter
--
Walter Lorenzetti
email: lorenzetti@gis3w.it
skype: aiki74
Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021
Viale Giuseppe Verdi n. 24, 51016
Montecatini Terme,Pistoia
P.IVA 01686280478
Italy
From adube at mapgears.com Tue Aug 4 08:09:17 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select feature for destroy a function
In-Reply-To: <4A781D45.6020504@gis3w.it>
References: <4A781D45.6020504@gis3w.it>
Message-ID: <4A7824ED.1090501@mapgears.com>
Hi Walter,
I don't know the answer to your question, but I have an alternative.
A while ago, I developed a small DeleteFeature control that could
resolve your problem. Take a look at this ticket (1), in the lastest
patch. I don't think this control will someday make it in the OpenLayers
API since it's too simple, but it's still handy anyway.
You need to register events (those in the control itself) to actually
destroy/commit your features.
Regards,
Alexandre
(1) http://trac.openlayers.org/ticket/1882
Walter Lorenzetti wrote:
> Hi All,
>
> for delete(destroy) a feature I use a SelectFeature Control where
> onSelect event I destroy the feature...:
>
> OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat});
>
> on IG.actions.confRemoveFeat I use a confirm dialog box for feature
> deleting...
> on 'Yes' option I destroy the feature but on 'No' option I've a problem.
> The problem is that the feature is highlighted again.. so for to
> unhighlight the feature I've to click outside it...
>
> I didn't find a method to unselect the feature by a method... on 'No'
>
> Someone can help me?
>
> Sorry for my bad english
>
> Thanks in advance
> Walter
>
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From jansen at terrestris.de Tue Aug 4 08:35:49 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
In-Reply-To: <4A781434.5050102@romtelecom.ro>
References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de>
<4A781434.5050102@romtelecom.ro>
Message-ID: <4A782B25.7090607@terrestris.de>
Hi Adrian,
have you either
* edited the lib/OpenLayers.js file?
* or deleted / renamed ressources in any of the folders below lib?
* Double check for "lib/OpenLayers/Layer.js"
Is Firebug showing any 404's in the Net(?)-tab?
Usually this works just fine.
Regards,
Marc
Adrian Popa schrieb:
> Hello Marc,
>
> I spoke too soon. If I use that file, I get ~34 errors in Firebug all
> complaining that "OpenLayers.Layer is undefined" in various js files.
> It seems something doesn't load properly.
>
> I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/
> directory on my web server. My page loads it like:
>
>
> Any ideas?
> Adrian
>
> Marc Jansen wrote:
>> Hi Adrian,
>>
>> assuming you are using a local copy of OpenLayers, you could use
>>
>> OpenLayers-Folder/lib/OpenLayers.js
>>
>> instead of
>>
>> OpenLayers-Folder/OpenLayers.js
>>
>> which would load lots of uncompressed/non-minimized js-files.
>>
>> Regards,
>> Marc
>>
>>
>> Adrian Popa schrieb:
>>> Hello,
>>>
>>> I'm running into a problem where firebug says "element doesn't
>>> exist" somewhere in OpenLayers code. I'm having trouble debugging
>>> this issue, because my Openlayers code is pretty compact. What
>>> should I include in to have OpenLayers with a more readable code? Is
>>> there an intermediary file with formatting preserved which I could
>>> use temporarly?
>>>
>>> Thanks,
>>> Adrian
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users@openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>
>>
>
>
--
Diplom-Geograph Marc Jansen
- Anwendungsentwickler -
terrestris GmbH & Co. KG
Irmintrudisstra?e 17
53111 Bonn
Tel: ++49 (0)228 / 96 28 99 -53
Fax: ++49 (0)228 / 96 28 99 -57
Email: jansen@terrestris.de
Web: http://terrestris.de
Amtsgericht Bonn, HRA 6835
Komplement?rin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams
From eric.lemoine at camptocamp.com Tue Aug 4 08:45:28 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select feature for destroy a function
In-Reply-To: <4A781D45.6020504@gis3w.it>
References: <4A781D45.6020504@gis3w.it>
Message-ID:
On Tue, Aug 4, 2009 at 1:36 PM, Walter Lorenzetti wrote:
> Hi All,
>
> for delete(destroy) a feature I use a SelectFeature Control where
> onSelect event I destroy the feature...:
>
> OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat});
>
> on IG.actions.confRemoveFeat I use a confirm dialog box for feature
> deleting...
> on 'Yes' option I destroy the feature but on 'No' option I've a problem.
> The problem is that the feature is highlighted again.. so for to
> unhighlight the feature I've to click outside it...
>
> I didn't find a ?method to unselect the feature by a method... on 'No'
>
> Someone can help me?
Hi. What if you call control.unselect(feature) where control is the
select feature control?
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From adrian_gh.popa at romtelecom.ro Tue Aug 4 08:53:12 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
In-Reply-To: <4A782B25.7090607@terrestris.de>
References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de>
<4A781434.5050102@romtelecom.ro> <4A782B25.7090607@terrestris.de>
Message-ID: <4A782F38.4040302@romtelecom.ro>
Hello Marc,
My answer is inline:
Marc Jansen wrote:
> Hi Adrian,
>
> have you either
>
> * edited the lib/OpenLayers.js file?
No, it is the original version - as far as I know
> * or deleted / renamed ressources in any of the folders below lib?
No.
> * Double check for "lib/OpenLayers/Layer.js"
File is there and get loaded just fine.
>
> Is Firebug showing any 404's in the Net(?)-tab?
No, I checked - all js get loaded.
The funny thing is - even if in Firefox with firebug this doesn't work
(also flushed the cache), in all other browsers it works - even in
firefox without Firebug. Maybe it's a firebug issue...
Thanks anyway for the help - I managed to track down the problem the
hard way...
Regards,
Adrian
>
> Usually this works just fine.
>
> Regards,
> Marc
>
>
>
>
> Adrian Popa schrieb:
>> Hello Marc,
>>
>> I spoke too soon. If I use that file, I get ~34 errors in Firebug all
>> complaining that "OpenLayers.Layer is undefined" in various js files.
>> It seems something doesn't load properly.
>>
>> I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/
>> directory on my web server. My page loads it like:
>>
>>
>> Any ideas?
>> Adrian
>>
>> Marc Jansen wrote:
>>> Hi Adrian,
>>>
>>> assuming you are using a local copy of OpenLayers, you could use
>>>
>>> OpenLayers-Folder/lib/OpenLayers.js
>>>
>>> instead of
>>>
>>> OpenLayers-Folder/OpenLayers.js
>>>
>>> which would load lots of uncompressed/non-minimized js-files.
>>>
>>> Regards,
>>> Marc
>>>
>>>
>>> Adrian Popa schrieb:
>>>> Hello,
>>>>
>>>> I'm running into a problem where firebug says "element doesn't
>>>> exist" somewhere in OpenLayers code. I'm having trouble debugging
>>>> this issue, because my Openlayers code is pretty compact. What
>>>> should I include in to have OpenLayers with a more readable code?
>>>> Is there an intermediary file with formatting preserved which I
>>>> could use temporarly?
>>>>
>>>> Thanks,
>>>> Adrian
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users@openlayers.org
>>>> http://openlayers.org/mailman/listinfo/users
>>>>
>>>>
>>>
>>>
>>
>>
>
>
From adrian_gh.popa at romtelecom.ro Tue Aug 4 09:03:25 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] "element is null" error in Openlayers
Message-ID: <4A78319D.8030608@romtelecom.ro>
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: element_is_null.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/b837e031/element_is_null.bin
From lorenzetti at gis3w.it Tue Aug 4 09:13:05 2009
From: lorenzetti at gis3w.it (Walter Lorenzetti)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select feature for destroy a function
In-Reply-To:
References: <4A781D45.6020504@gis3w.it>
Message-ID: <4A7833E1.6060906@gis3w.it>
Eric Lemoine ha scritto:
>
>
> Hi. What if you call control.unselect(feature) where control is the
> select feature control?
>
>
>
>
Hi Eric, hi Alexandre,
Thank you very much...
The Eric reply works... fine
I don't find the unselect method on OL API documentation...
I remember me to watch the code :)
I watch at deleteFeature control example and I find It a good new contro
dot add to OL main code...
At the momente for may application is not neccessary but... is possible
tha I'll can use it in the future..
Thanks again tooo
Bye Walter
--
Walter Lorenzetti
email: lorenzetti@gis3w.it
skype: aiki74
Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021
Viale Giuseppe Verdi n. 24, 51016
Montecatini Terme,Pistoia
P.IVA 01686280478
Italy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/04445f97/attachment.html
From tommytomorow at msn.com Tue Aug 4 10:02:30 2009
From: tommytomorow at msn.com (tommy408)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Changing mouse click
Message-ID: <1249394550937-3384702.post@n2.nabble.com>
What should I be looking if I want to change to panning with the right mouse
button? And still selecting features with left mouse?
--
View this message in context: http://n2.nabble.com/Changing-mouse-click-tp3384702p3384702.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From acant at alumni.uwaterloo.ca Tue Aug 4 11:38:08 2009
From: acant at alumni.uwaterloo.ca (Andrew Sullivan Cant)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Using a more readable OpenLayers.js
Message-ID: <1249400288.3546.2.camel@Nokia-N810-36-5>
Adrian,
I saw a similar error when I was attempting to integrate OL into Drupal. I was only experimenting at the time so I have not followed up.
I would be really interested to hear what you find. And I will go back to my own work and see whatelse I can report on the problem that I was seeing.
Andrew
----- Original message -----
> Hello Marc,
>
> I spoke too soon. If I use that file, I get ~34 errors in Firebug all
> complaining that "OpenLayers.Layer is undefined" in various js files. It
> seems something doesn't load properly.
>
> I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/
> directory on my web server. My page loads it like:
>
>
> Any ideas?
> Adrian
>
> Marc Jansen wrote:
> > Hi Adrian,
> >
> > assuming you are using a local copy of OpenLayers, you could use
> >
> > OpenLayers-Folder/lib/OpenLayers.js
> >
> > instead of
> >
> > OpenLayers-Folder/OpenLayers.js
> >
> > which would load lots of uncompressed/non-minimized js-files.
> >
> > Regards,
> > Marc
> >
> >
> > Adrian Popa schrieb:
> > > Hello,
> > >
> > > I'm running into a problem where firebug says "element doesn't exist"
> > > somewhere in OpenLayers code. I'm having trouble debugging this
> > > issue, because my Openlayers code is pretty compact. What should I
> > > include in to have OpenLayers with a more readable code? Is there an
> > > intermediary file with formatting preserved which I could use
> > > temporarly?
> > >
> > > Thanks,
> > > Adrian
> > >
> > > _______________________________________________
> > > Users mailing list
> > > Users@openlayers.org
> > > http://openlayers.org/mailman/listinfo/users
> > >
> > >?
> >
> >
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
From lorenzetti at gis3w.it Tue Aug 4 12:24:13 2009
From: lorenzetti at gis3w.it (Walter Lorenzetti)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Right click on selected feature
Message-ID: <4A7860AD.3050006@gis3w.it>
Hi list,
is possible to trig a Rightclick event on a selected feature?
Thanks in advance
Walter
--
Walter Lorenzetti
email: lorenzetti@gis3w.it
skype: aiki74
Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021
Viale Giuseppe Verdi n. 24, 51016
Montecatini Terme,Pistoia
P.IVA 01686280478
Italy
From n.e.kendall at gmail.com Tue Aug 4 13:29:23 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Problem with Layer.vector
In-Reply-To:
References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
Message-ID: <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com>
Hi Eric,
I'm still new to Jscript, can you clarify this a little? or point me in the
right direction?
best,
Nick
On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine wrote:
> On Monday, August 3, 2009, Nicholas Efremov-Kendall
> wrote:
> > Hi all,I've been trying to implement my gml as a layer.vector, as opposed
> to a layer.gml. I'm loading both into the browser with the different
> methods, and I can from firebug that the file is getting loaded, but it's
> not being displayed. Thus, if I re-sent my auto-center to sites2.events, it
> doesn't center at all. I'm not sure what going wrong here, I thought I'd
> followed the examples pretty closely. Thanks (again) in advance.
> > //loads fine var sites = new OpenLayers.Layer.GML (
> > "Archaeological Sites", "data/siteswatr.gml",
> > {
> > style: {pointRadius: 2.5},
> > projection: new OpenLayers.Projection("EPSG:4326"),
> > format: OpenLayers.Format.GML,
> > }
> > );
> > map.addLayer(sites);
> > // loads into browser but not displayed.
> > var sites2 = new OpenLayers.Layer.Vector (
> > "sites2", {projection: map.displayProjection, strategies:
> [new OpenLayers.Strategy.Fixed()], protocol: new
> OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new
> OpenLayers.Format.GML()]})});
> > map.addLayer(sites2);
>
> Your code looks correct to me. The Fixed strategy empties the layer
> before adding features into it, which could explain why you see one
> set of features only. I'd recommend adding a break point in the fixed
> strategy's merge() method to understand what's going on.
>
> >
> >
> >
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/1773a232/attachment.html
From eric.lemoine at camptocamp.com Tue Aug 4 15:29:30 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Problem with Layer.vector
In-Reply-To: <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com>
References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
<33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com>
Message-ID:
On Tuesday, August 4, 2009, Nicholas Efremov-Kendall
wrote:
> Hi Eric,
> I'm still new to Jscript, can you clarify this a little? or point me in the right direction?
Hi. I meant install the FireBug extension in FireFox and use it to add
breakpoints in the code and watch variables. Hope this clarifies
things...
best,Nick
> On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine wrote:
> On Monday, August 3, 2009, Nicholas Efremov-Kendall
> wrote:
>> Hi all,I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance.
>> //loads fine?var ? ? ?sites = new OpenLayers.Layer.GML (
>> ? ? ? ? ? ? ? "Archaeological Sites", "data/siteswatr.gml",
>> ? ? ? ? ? ? ? {
>> ? ? ? ? ? ? ? style: {pointRadius: 2.5},
>> ? ? ? ? ? ? ? projection: new OpenLayers.Projection("EPSG:4326"),
>> ? ? ? ? ? ? ? format: OpenLayers.Format.GML,
>> ? ? ? ? ? ? ? }
>> ? ? ? ? ? ? ? );
>> ? ? ? map.addLayer(sites);
>> ?// loads into browser but not displayed.
>> ? ? ? ? ? ? ? var sites2 = new OpenLayers.Layer.Vector (
>> ? ? ? ? ? ? ? "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});
>> ? ? ? ? ? ? ? map.addLayer(sites2);
>
> Your code looks correct to me. The Fixed strategy empties the layer
> before adding features into it, which could explain why you see one
> set of features only. I'd recommend adding a break point in the fixed
> strategy's merge() method to understand what's going on.
>
>>
>>
>>
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
>
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From n.e.kendall at gmail.com Tue Aug 4 15:37:00 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Problem with Layer.vector
In-Reply-To:
References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com>
<33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com>
Message-ID: <33fd44f90908041237m7eda71a2pb8822590677f270e@mail.gmail.com>
Hi Eric,
Yes, somewhat.
On Tue, Aug 4, 2009 at 10:29 PM, Eric Lemoine
wrote:
> On Tuesday, August 4, 2009, Nicholas Efremov-Kendall
> wrote:
> > Hi Eric,
> > I'm still new to Jscript, can you clarify this a little? or point me in
> the right direction?
>
> Hi. I meant install the FireBug extension in FireFox and use it to add
> breakpoints in the code and watch variables. Hope this clarifies
> things...
>
>
>
> best,Nick
> > On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine <
> eric.lemoine@camptocamp.com> wrote:
> > On Monday, August 3, 2009, Nicholas Efremov-Kendall
> > wrote:
> >> Hi all,I've been trying to implement my gml as a layer.vector, as
> opposed to a layer.gml. I'm loading both into the browser with the different
> methods, and I can from firebug that the file is getting loaded, but it's
> not being displayed. Thus, if I re-sent my auto-center to sites2.events, it
> doesn't center at all. I'm not sure what going wrong here, I thought I'd
> followed the examples pretty closely. Thanks (again) in advance.
> >> //loads fine var sites = new OpenLayers.Layer.GML (
> >> "Archaeological Sites", "data/siteswatr.gml",
> >> {
> >> style: {pointRadius: 2.5},
> >> projection: new OpenLayers.Projection("EPSG:4326"),
> >> format: OpenLayers.Format.GML,
> >> }
> >> );
> >> map.addLayer(sites);
> >> // loads into browser but not displayed.
> >> var sites2 = new OpenLayers.Layer.Vector (
> >> "sites2", {projection: map.displayProjection, strategies:
> [new OpenLayers.Strategy.Fixed()], protocol: new
> OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new
> OpenLayers.Format.GML()]})});
> >> map.addLayer(sites2);
> >
> > Your code looks correct to me. The Fixed strategy empties the layer
> > before adding features into it, which could explain why you see one
> > set of features only. I'd recommend adding a break point in the fixed
> > strategy's merge() method to understand what's going on.
> >
> >>
> >>
> >>
> >
> > --
> > Eric Lemoine
> >
> > Camptocamp France SAS
> > Savoie Technolac, BP 352
> > 73377 Le Bourget du Lac, Cedex
> >
> > Tel : 00 33 4 79 44 44 96
> > Mail : eric.lemoine@camptocamp.com
> > http://www.camptocamp.com
> >
> >
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/d7ca39da/attachment.html
From hagen1113 at yahoo.com Tue Aug 4 19:08:12 2009
From: hagen1113 at yahoo.com (Raul David Orozco)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select layer style
Message-ID: <763790.76715.qm@web51412.mail.re2.yahoo.com>
I'm here again asking for help.
I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me.
____________________________________________________________________________________
?Obt?n la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8.
http://downloads.yahoo.com/ieak8/?l=e1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/93a4e781/attachment.html
From petedawn at gmail.com Tue Aug 4 21:43:32 2009
From: petedawn at gmail.com (Peter Dawn)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] KML write custom attribute
Message-ID: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com>
Hi everyone,
I am using open layers to write to kml. I am able to successfully
write to a 'Description' attribute as its already in KML.
But if I need to introduce a new attribute like 'Info', I am unable to
write to it using open layer. I would expected, since KML is just XML
it would allow me to create a custom attribute.
So if I use,
kmlFormater.write(features);
This writes to just description attribute.
If I create my own then it doesn't. Does anybody know if there is a
work around this.
Thanks.
From eric.lemoine at camptocamp.com Wed Aug 5 00:38:32 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select layer style
In-Reply-To: <763790.76715.qm@web51412.mail.re2.yahoo.com>
References: <763790.76715.qm@web51412.mail.re2.yahoo.com>
Message-ID:
On Wednesday, August 5, 2009, Raul David Orozco wrote:
> I'm here again asking for help.
> I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me.
Hi. Yoy can provide (named) styles the same way you provide layers:
new OpenLayers.Layer.WMS("name", url, {
layers: "layername", styles: "stylename"
});
Hope this helps,
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From eric.lemoine at camptocamp.com Wed Aug 5 00:41:44 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Select layer style
In-Reply-To:
References: <763790.76715.qm@web51412.mail.re2.yahoo.com>
Message-ID:
On Wednesday, August 5, 2009, Eric Lemoine wrote:
> On Wednesday, August 5, 2009, Raul David Orozco wrote:
>> I'm here again asking for help.
>> I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me.
>
> Hi. Yoy can provide (named) styles the same way you provide layers:
>
> new OpenLayers.Layer.WMS("name", url, {
> ? ?layers: "layername", styles: "stylename"
> });
And if you want to change style afterwards do
layer.mergeNewParams({styles: "newstylename"});
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From bicphuongonline at yahoo.com Wed Aug 5 00:58:03 2009
From: bicphuongonline at yahoo.com (Mr. Bic Phuong)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Map not show in Overviewmap
Message-ID: <18058.89990.qm@web35101.mail.mud.yahoo.com>
Dear OpenLayers members and developers,
I hope you can help me to solve this problem of overviewmap:
This is my map:
________________________________________________
var mainMapOptions = {
??? ??? ??? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
??? ??? ??? maxResolution: 585,
??? ??? ??? projection:"EPSG:4756",
??? ??? ??? units: "m",
??? ??? ??? tilesize: new OpenLayers.Size(256,256),
??? ??? ??? numZoomLevels: 11,
??? ??? ??? controls:[]
???
??? };
??? ??? map = new OpenLayers.Map(document.getElementById('map'),mainMapOptions);
??????? var base = new OpenLayers.Layer("Lop nen",{isBaseLayer: true, displayInLayerSwitcher: false});
???? ?? map.addLayer(base);
??????? alayer = new OpenLayers.Layer.WMS("base layer", wms_host1,{layers:'stmstest',format: 'image/png', transparent: true});
__________________________________________
and this is my overviewmap:
__________________________________________
var overviewOptions =
{
??? ??? ?? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
?????????? restrictedExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
?????????? maxResolution: 585,
??? ??? ?? units: 'm',
??? ??? ?? layers: [alayer],
??? ??? ?? tilesize: new OpenLayers.Size(256,256),
?????????? projection: "EPSG:4756",
?????????? numZoomLevels: 11};
??? ??? var ovv = new OpenLayers.Control.OverviewMap({mapOptions: overviewOptions})
??? ???
map.addControl(ovv);
__________________________________________
The problem is: no map in overviewmap control.
I read many posts but none of them help me. This link:
http://n2.nabble.com/Problems-with-Overviewmap-td2861501.html#a2861501
is good news but no information for details
Thanks for your attention!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/11e81ead/attachment.html
From e.leoni at gmail.com Wed Aug 5 01:27:36 2009
From: e.leoni at gmail.com (Eduardo Leoni)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] simple maps
Message-ID:
Hello -
I wonder if anyone here knows of a wms service with simple maps (e.g.
political boundaries and place names only.) The
http://labs.metacarta.com/wms service looks fine when zoomed out, but
has too many features (such as rivers and lakes) when zoomed in.
Thanks! This is great software, and I am having a blast.
-Eduardo
From eric.lemoine at camptocamp.com Wed Aug 5 02:13:40 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Map not show in Overviewmap
In-Reply-To: <18058.89990.qm@web35101.mail.mud.yahoo.com>
References: <18058.89990.qm@web35101.mail.mud.yahoo.com>
Message-ID:
Hi. Try to give the overview map a clone of aLayer (aLayer.clone()).
Hope this helps,
On Wednesday, August 5, 2009, Mr. Bic Phuong wrote:
>
> Dear OpenLayers members and developers,
>
> I hope you can help me to solve this problem of overviewmap:
>
> This is my map:
> ________________________________________________
> var mainMapOptions = {
> ??? ??? ??? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
> ??? ??? ??? maxResolution: 585,
> ??? ??? ??? projection:"EPSG:4756",
> ??? ??? ??? units: "m",
> ??? ??? ??? tilesize: new OpenLayers.Size(256,256),
> ??? ??? ??? numZoomLevels: 11,
> ??? ??? ??? controls:[]
> ??? };
> ??? ??? map = new OpenLayers.Map(document.getElementById('map'),mainMapOptions);
> ??????? var base = new OpenLayers.Layer("Lop nen",{isBaseLayer: true, displayInLayerSwitcher: false});
> ???? ?? map.addLayer(base);
> ??????? alayer = new OpenLayers.Layer.WMS("base layer", wms_host1,{layers:'stmstest',format: 'image/png', transparent: true});
> __________________________________________
>
> and this is my overviewmap:
>
> __________________________________________
> var overviewOptions =
> {
> ??? ??? ?? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
> ?????????? restrictedExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090),
> ?????????? maxResolution: 585,
> ??? ??? ?? units: 'm',
> ??? ??? ?? layers: [alayer],
> ??? ??? ?? tilesize: new OpenLayers.Size(256,256),
> ?????????? projection: "EPSG:4756",
> ?????????? numZoomLevels: 11};
> ??? ??? var ovv = new OpenLayers.Control.OverviewMap({mapOptions: overviewOptions})
> map.addControl(ovv);
> __________________________________________
>
> The problem is: no map in overviewmap control.
>
> I read many posts but none of them help me. This link:
>
> http://n2.nabble.com/Problems-with-Overviewmap-td2861501.html#a2861501
>
> is good news but no information for details
>
> Thanks for your attention!
>
>
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From bicphuongonline at yahoo.com Wed Aug 5 03:37:00 2009
From: bicphuongonline at yahoo.com (Mr. Bic Phuong)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Map not show in Overviewmap
Message-ID: <430359.20969.qm@web35105.mail.mud.yahoo.com>
Merci Eric,
But that's not working.
Please help me !
--- On Wed, 8/5/09, Eric Lemoine wrote:
From: Eric Lemoine
Subject: Re: [OpenLayers-Users] Map not show in Overviewmap
To: "Mr. Bic Phuong"
Cc: users@openlayers.org
Date: Wednesday, August 5, 2009, 1:13 PM
Hi. Try to give the overview map a clone of aLayer (aLayer.clone()).
Hope this helps,
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44
96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/d0775e65/attachment.html
From bicphuongonline at yahoo.com Wed Aug 5 03:56:07 2009
From: bicphuongonline at yahoo.com (Mr. Bic Phuong)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Map not show in Overviewmap
In-Reply-To:
Message-ID: <809893.74793.qm@web35103.mail.mud.yahoo.com>
Merci Eric,
But that's not working.
Please help me !
--- On Wed, 8/5/09, Eric Lemoine wrote:
From: Eric Lemoine
Subject: Re: [OpenLayers-Users] Map not show in Overviewmap
To: "Mr. Bic Phuong"
Cc: users@openlayers.org
Date: Wednesday, August 5, 2009, 1:13 PM
Hi. Try to give the overview
map a clone of aLayer (aLayer.clone()).
Hope this helps,
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44
96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/74c5cce9/attachment.html
From adrian_gh.popa at romtelecom.ro Wed Aug 5 04:00:07 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click. [SOLVED]
In-Reply-To: <4A76D414.805@mapgears.com>
References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com>
Message-ID: <4A793C07.9060105@romtelecom.ro>
Following Alexandre's suggestion, here's what I did:
... //in init()
map.addLayer(markers);
//add the main select (for regular popups)
select = new OpenLayers.Control.SelectFeature(markers, {toggle:true,
clickout: true});
markers.events.on({ "featureselected": onMarkerSelect,
"featureunselected": onMarkerUnselect});
//add the second select for tooltips:
var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, {
hover: true, highlightOnly: true, renderIntent: "temporary",
eventListeners: { featurehighlighted: tooltipSelect,
featureunhighlighted: tooltipUnselect } });
//the order in which you add these lines seems to matter!
map.addControl(highlightCtrl);
map.addControl(select);
highlightCtrl.activate();
select.activate();
...//support functions
var lastFeature = null;
var tooltipPopup = null;
function tooltipSelect(event){
var feature = event.feature;
var selectedFeature = feature;
//if there is already an opened details window, don\'t draw the
tooltip
if(feature.popup != null){
return;
}
//if there are other tooltips active, destroy them
if(tooltipPopup != null){
map.removePopup(tooltipPopup);
tooltipPopup.destroy();
if(lastFeature != null){
delete lastFeature.popup;
tooltipPopup = null;
}
}
lastFeature = feature;
var tooltipPopup = new OpenLayers.Popup("activetooltip",
feature.geometry.getBounds().getCenterLonLat(),
new OpenLayers.Size(80,12),
" "+feature.attributes.name,
true );
//this is messy, but I'm not a CSS guru
tooltipPopup.contentDiv.style.backgroundColor='ffffcb';
tooltipPopup.closeDiv.style.backgroundColor='ffffcb';
tooltipPopup.contentDiv.style.overflow='hidden';
tooltipPopup.contentDiv.style.padding='3px';
tooltipPopup.contentDiv.style.margin='0';
tooltipPopup.closeOnMove = true;
tooltipPopup.autoSize = true;
feature.popup = tooltipPopup;
map.addPopup(tooltipPopup);
}
function tooltipUnselect(event){
var feature = event.feature;
if(feature != null && feature.popup != null){
map.removePopup(feature.popup);
feature.popup.destroy();
delete feature.popup;
tooltipPopup = null;
lastFeature = null;
}
}
function onMarkerSelect(event) {
//unselect any previous selections
tooltipUnselect(event);
var feature = event.feature;
var selectedFeature = feature;
var popup = new OpenLayers.Popup.FramedCloud("activeAlarm",
feature.geometry.getBounds().getCenterLonLat(),
new OpenLayers.Size(100,100),
"Loading...",
null, true, onMarkerPopupClose );
feature.popup = popup;
popup.setOpacity(0.7);
map.addPopup(popup);
//call ajax to get the data
loadDetails(feature.attributes.description);
}
function onMarkerUnselect(event) {
var feature = event.feature;
if(feature.popup) {
map.removePopup(feature.popup);
feature.popup.destroy();
delete feature.popup;
}
}
function onMarkerPopupClose(evt) {
select.unselectAll();
}
I hope this helps others trying to add this feature.
Thanks again for your help.
Regards,
Adrian
Alexandre Dube wrote:
> Hi Adrian,
>
> Take a look at this example (1). You can use 2 SelectFeature
> controls for what you need, one with hover:true and
> highlightOnly:true, the other with hover false. The first one won't
> actually select the feature and you can register 3 kinds of
> "highlight" events (see the source) to display your small div/popup.
>
> Hope this helps,
>
> Alexandre
>
> (1) http://openlayers.org/dev/examples/highlight-feature.html
>
> Adrian Popa wrote:
>> Hello everyone,
>>
>> This is sort of a repeat message of "Re: [OpenLayers-Users]
>> Labels/Tooltips on mouse over a Vector layer" - but with a slightly
>> different idea.
>>
>> Problem: I want to display a small div/popup with the marker's name
>> when the user hovers his mouse over the location, and I want to
>> display a bigger popup when the user actually clicks on the location.
>>
>> Current status:
>> * I can use {hover: true} to register
>> featureselected/featureunselected when I hover over a marker instead
>> on when I click on the maker.
>> * I haven't found any events that could differentiate between hover
>> and click
>>
>> I'm thinking I could register my select control with hover: true and
>> allow featureselected to execute the same function for both when I
>> click on the makrer as well as when I hover over the marker. I would
>> like to know if there's any way to find out in the event inside the
>> function if the user clicked or not his mouse. Depending on this, I
>> would show one popup or the other.
>>
>> Something like:
>>
>> select = new OpenLayers.Control.SelectFeature(markers,
>> {clickout:true, hover:true});
>> markers.events.on({ "featureselected": onMarkerSelect,
>> "featureunselected": onMarkerUnselect, "visibilitychanged":
>> onMarkerToggle });
>> map.addControl(select);
>> select.activate();
>>
>> function onMarkerSelect(event){
>> var feature = event.feature;
>> //find out if the user clicked or not
>> var clicked = event.*findAWayToSeeIfTheUserClicked()*;
>> if(clicked){
>> //show larger popup
>> }
>> else{
>> //show smaller popup
>> }
>> }
>>
>> Suggestions are welcome.
>>
>> Thanks,
>> Adrian
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
From arbolito at gmail.com Wed Aug 5 05:14:12 2009
From: arbolito at gmail.com (Albert)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Generate image
Message-ID: <1249463652.13144.8.camel@pirimpompito-laptop>
Hi! I'm trying to generate an image of a map that has a WMS layer and an
OpenLayers.Layer.Vector of features that are markers. I followed the
"Tile stitching" method in http://trac.openlayers.org/wiki/Printing. The
problem is that i can generate an image of the WMS layer, but the
markers are not showing as they belong to a layer that is not tiled.
Anyone has any idea of how to do this?
Thanks!
Albert Batiste.
From bartvde at osgis.nl Wed Aug 5 05:16:51 2009
From: bartvde at osgis.nl (bartvde@osgis.nl)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Generate image
In-Reply-To: <1249463652.13144.8.camel@pirimpompito-laptop>
References: <1249463652.13144.8.camel@pirimpompito-laptop>
Message-ID: <59033.145.50.39.11.1249463811.squirrel@webmail.hostingdiscounter.nl>
Try out the MapFish print service.
Best regards,
Bart
> Hi! I'm trying to generate an image of a map that has a WMS layer and an
> OpenLayers.Layer.Vector of features that are markers. I followed the
> "Tile stitching" method in http://trac.openlayers.org/wiki/Printing. The
> problem is that i can generate an image of the WMS layer, but the
> markers are not showing as they belong to a layer that is not tiled.
> Anyone has any idea of how to do this?
> Thanks!
> Albert Batiste.
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From bartvde at osgis.nl Wed Aug 5 05:33:49 2009
From: bartvde at osgis.nl (bartvde@osgis.nl)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Generate image
In-Reply-To: <1249464495.13144.10.camel@pirimpompito-laptop>
References: <1249463652.13144.8.camel@pirimpompito-laptop>
<59033.145.50.39.11.1249463811.squirrel@webmail.hostingdiscounter.nl>
<1249464495.13144.10.camel@pirimpompito-laptop>
Message-ID: <19597.145.50.39.11.1249464829.squirrel@webmail.hostingdiscounter.nl>
Hi,
the print service can be used without MapFish client, it is fed by JSON.
The MapFish PrintProtocol is the communication layer you can use. But it
is not required.
Best regards,
Bart
> But in that case i would have to change all my application to MapFish,
> wouldn't I?
> Thanks,
> Albert Batiste.
>
> El mi??, 05-08-2009 a las 11:16 +0200, bartvde@osgis.nl escribi??:
>> Try out the MapFish print service.
>>
>> Best regards,
>> Bart
>>
>> > Hi! I'm trying to generate an image of a map that has a WMS layer and
>> an
>> > OpenLayers.Layer.Vector of features that are markers. I followed the
>> > "Tile stitching" method in http://trac.openlayers.org/wiki/Printing.
>> The
>> > problem is that i can generate an image of the WMS layer, but the
>> > markers are not showing as they belong to a layer that is not tiled.
>> > Anyone has any idea of how to do this?
>> > Thanks!
>> > Albert Batiste.
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users@openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>>
>>
>
>
From patzke at geoinformationsdienst.de Wed Aug 5 07:15:21 2009
From: patzke at geoinformationsdienst.de (Fabian Patzke)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Adding Feature to WFS in Vector Layer / Copying
Features
Message-ID:
Hi list,
I try to build a copy function so that a user can select some features from a
WFS and copy them to another.
My WFS are not normal WFS Layers they are build in Vector Layers
wfsLayer [layerArray[j].name] = new OpenLayers.Layer.Vector (
...
{
strategies: [
new OpenLayers.Strategy.Fixed({preload:false}),
new OpenLayers.Strategy.Save({
...
],
projection: new OpenLayers.Projection("EPSG:31467"),
protocol: new OpenLayers.Protocol.WFS({...})
},
...
);
I made a function to select features from a WFS, these features are temporarily
stored in a normal Vector layer ("select"). This function is build after:
http://www.openlayers.org/dev/examples/getfeature-wfs.html
Another function is called after the end of selecting features, the user has to
end selecting manually. This should be the copy function. The function should
take all features from the "select" layer and copy them over to the wfsLayer
from above.
That is all I have so far:
function copySelectedFeatures (wfsLayer){
features = select.features;
for (i=0;i
Message-ID:
Fabian Patzke writes:
If it helps this is the POST request made to my WFS:
And the Response:
A working Transaction POST request (after drawing a new feature):
So there must something wrong with commiting the newly added feature, I guess :)
3477069.1826687,5883961.3605044 3476363.6274941,5883961.3605044
3522224.7138402,5827516.9465399 3559619.1380917,5892428.0225991
3477069.1826687,5883961.3605044
And working response:
From kenny at xarex.com Wed Aug 5 08:04:33 2009
From: kenny at xarex.com (Kenny France)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] multiple layers
Message-ID: <01aa01ca15c4$e5675c10$b0361430$@com>
Hi guys,
I have 3 layers;
marker layer 1
marker layer 2
vector layer
Now for some reason, if I use the drawing toolbar on the vector layer, then
my markers on the marker layer cant be clicked anymore L
Is there a way i can make the marker layer active again i think this is the
problem
Thanks
K-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/2db6e77b/attachment.html
From adube at mapgears.com Wed Aug 5 08:05:33 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] KML write custom attribute
In-Reply-To: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com>
References: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com>
Message-ID: <4A79758D.1080901@mapgears.com>
Hi Peter,
How do you add your new 'Info' attribute to your feature ? Please, share
some of your code.
Regards,
Alexandre
Peter Dawn wrote:
> Hi everyone,
>
> I am using open layers to write to kml. I am able to successfully
> write to a 'Description' attribute as its already in KML.
>
> But if I need to introduce a new attribute like 'Info', I am unable to
> write to it using open layer. I would expected, since KML is just XML
> it would allow me to create a custom attribute.
>
> So if I use,
> kmlFormater.write(features);
> This writes to just description attribute.
>
> If I create my own then it doesn't. Does anybody know if there is a
> work around this.
>
> Thanks.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From jlacroix at mapgears.com Wed Aug 5 09:19:14 2009
From: jlacroix at mapgears.com (Julien-Samuel Lacroix)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Right click on selected feature
In-Reply-To: <4A7860AD.3050006@gis3w.it>
References: <4A7860AD.3050006@gis3w.it>
Message-ID: <4A7986D2.2080807@mapgears.com>
The Click handler in OpenLayers support the right click, but the
SelectFeature control don't integrate this functionality. IMHO, you can
modify the SelectFeature control to add this quite easily if you want to
add that. Check the Navigation control for examples.
Julien
Walter Lorenzetti wrote:
> Hi list,
>
> is possible to trig a Rightclick event on a selected feature?
>
> Thanks in advance
> Walter
>
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
From mlernout at gmail.com Wed Aug 5 12:38:22 2009
From: mlernout at gmail.com (MattL)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Navigation + SelectFeature
Message-ID: <1249490302391-3393324.post@n2.nabble.com>
Hi,
I would like to use SelectFeature as my map's default tool, but it appears
to only allow mouse wheel zoom navigation. How can I get it to support
DragPanning as well?
Thanks,
Matt
--
View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393324.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From mlernout at gmail.com Wed Aug 5 12:50:07 2009
From: mlernout at gmail.com (MattL)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Navigation + SelectFeature
In-Reply-To: <1249490302391-3393324.post@n2.nabble.com>
References: <1249490302391-3393324.post@n2.nabble.com>
Message-ID: <1249491007682-3393416.post@n2.nabble.com>
Silly me, I had set the box property to true. All's well now.
MattL wrote:
>
> Hi,
>
> I would like to use SelectFeature as my map's default tool, but it appears
> to only allow mouse wheel zoom navigation. How can I get it to support
> DragPanning as well?
>
> Thanks,
> Matt
>
--
View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393416.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From eric.lemoine at camptocamp.com Wed Aug 5 13:10:47 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Navigation + SelectFeature
In-Reply-To: <1249491007682-3393416.post@n2.nabble.com>
References: <1249490302391-3393324.post@n2.nabble.com>
<1249491007682-3393416.post@n2.nabble.com>
Message-ID:
On Wednesday, August 5, 2009, MattL wrote:
>
> Silly me, I had set the box property to true. All's well now.
Hi. FYI I've recently noticed that order matters, I bet the select
control doesn't work if you do
var s = new OpenLayers.Control.SelecFeature(...);
var n = new OpenLayers.Control.Navigation();
map.addControl(s);
s.activate();
map.addControl(n);
This is because the navigation control's drag handler stops mousedown
(stopDown is true).
This is problematic if one has a toolbar with the nav control in a
toggle group and wants the select control to be always activated.
If you confirm that the select control does not work with the order
used in the above code snippet I'll create a ticket.
Cheers,
>
>
> MattL wrote:
>>
>> Hi,
>>
>> I would like to use SelectFeature as my map's default tool, but it appears
>> to only allow mouse wheel zoom navigation. How can I get it to support
>> DragPanning as well?
>>
>> Thanks,
>> Matt
>>
>
> --
> View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393416.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From gregcorradini at gmail.com Wed Aug 5 15:21:23 2009
From: gregcorradini at gmail.com (Greg Corradini)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] point.transform FAIL
Message-ID: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com>
Hello,
The following code works with other EPSG mercator projections. But I
can't get it to transform my LonLat point into EPSG:26915. This made
me think I didn't set up the proj4 file correctly -- maybe when I call
"new OpenLayers.Projection("EPSG:26915")" it can't find it. However,
my displayProjection is set using the same function to EPSG:26915 and
all my WMS layers show up correctly. Any ideas? FireBug confirms that
the function point.transform returns the exact same LonLat I passed in
-- I end up south of Ghana in the ocean. Oh No!
Thanks for your thoughts
From ivan.grcic at geofoto.hr Wed Aug 5 16:58:15 2009
From: ivan.grcic at geofoto.hr (Ivan Grcic)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] multiple layers
In-Reply-To: <01aa01ca15c4$e5675c10$b0361430$@com>
References: <01aa01ca15c4$e5675c10$b0361430$@com>
Message-ID:
Hi,
i guess draw control brings your vector layer to the top so it could
be drawn on.
you could register a function on draw control deactivate event, that
would bring your marker layer back to top.
drawControl.events.register('deactivate', drawControl, function(){
//here you can move your desired layer to top...
//maybe this will do??
map.resetLayersZIndex();
//and activate selectControl again..
selectcontrol.activate();
})
hope it helps,
cheers
On 8/5/09, Kenny France wrote:
> Hi guys,
>
>
>
> I have 3 layers;
>
>
>
> marker layer 1
>
> marker layer 2
>
> vector layer
>
>
>
> Now for some reason, if I use the drawing toolbar on the vector layer, then
> my markers on the marker layer cant be clicked anymore L
>
>
>
> Is there a way i can make the marker layer active again i think this is the
> problem
>
>
>
> Thanks
>
>
>
> K-
>
>
--
Ivan Grcic
From ivan.grcic at geofoto.hr Wed Aug 5 16:59:06 2009
From: ivan.grcic at geofoto.hr (Ivan Grcic)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] point.transform FAIL
In-Reply-To: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com>
References: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com>
Message-ID:
hi,
you included proj4js right?
On 8/5/09, Greg Corradini wrote:
> Hello,
> The following code works with other EPSG mercator projections. But I
> can't get it to transform my LonLat point into EPSG:26915. This made
> me think I didn't set up the proj4 file correctly -- maybe when I call
> "new OpenLayers.Projection("EPSG:26915")" it can't find it. However,
> my displayProjection is set using the same function to EPSG:26915 and
> all my WMS layers show up correctly. Any ideas? FireBug confirms that
> the function point.transform returns the exact same LonLat I passed in
> -- I end up south of Ghana in the ocean. Oh No!
>
> Thanks for your thoughts
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From ivan.grcic at geofoto.hr Wed Aug 5 17:05:13 2009
From: ivan.grcic at geofoto.hr (Ivan Grcic)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] point.transform FAIL
In-Reply-To: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com>
References: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com>
Message-ID:
hi,
i remembered i had some little problems with proj4js.. i just remember
i had to include EPSG:26915 definition in seperate file in
proj4js\lib\defs dir, or in the code like:
Proj4js.defs["EPSG:32632"]="+title=UTM 32N +proj=utm +zone=32
+ellps=WGS84 +datum=WGS84 +units=m +no_defs ";
and then call new Proj4js.Proj('EPSG:32632'); before using it.
and it worked fine then
hope it helps,
cheers
On 8/5/09, Greg Corradini wrote:
> Hello,
> The following code works with other EPSG mercator projections. But I
> can't get it to transform my LonLat point into EPSG:26915. This made
> me think I didn't set up the proj4 file correctly -- maybe when I call
> "new OpenLayers.Projection("EPSG:26915")" it can't find it. However,
> my displayProjection is set using the same function to EPSG:26915 and
> all my WMS layers show up correctly. Any ideas? FireBug confirms that
> the function point.transform returns the exact same LonLat I passed in
> -- I end up south of Ghana in the ocean. Oh No!
>
> Thanks for your thoughts
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From petedawn at gmail.com Wed Aug 5 21:18:09 2009
From: petedawn at gmail.com (Peter Dawn)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OpenLayer SLD does not display labels
Message-ID: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com>
Hi all,
I am trying to display labels on my map. But when I turn on the
labels, all labels do not show up. When I zoom in further labels start
showing up.
What I need to do is, display all labels at the default scale, even if
it looks all cluttered. There is a MinScaleDenominator and
MaxScaleDenominator flag and I tried to tweak them. Even if I set the
max scale to really high, all labels do not show up.
Can somebody tell me if there is a way to do display all labels
irrespective of the scale.
Thanks.
From bicphuongonline at yahoo.com Wed Aug 5 21:44:35 2009
From: bicphuongonline at yahoo.com (Mr. Bic Phuong)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] How to make web map faster
Message-ID: <241626.39069.qm@web35108.mail.mud.yahoo.com>
Dear OpenLayers Developers and Users,
Currently I'm using MapServer and OpenLayers for my web map which has:
- 1 tilecache layer (base map)
- 17 WMS layer
So there are 2 big problems:
- There are 17 connections to ArcSDE Oracle in the map file. How can I use 01 connection for all layers ?
- It's too slow to load when visitors turn on more than 2 WMS layers, the tilecache layer is ok but WMS layers is two slow. I'm wondering whether there is any way to load a part of layer or something similar to make it faster?
Thanks for your attention and your help is highly appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/4ab4062b/attachment.html
From rahn at zhaw.ch Thu Aug 6 02:05:07 2009
From: rahn at zhaw.ch (Rahn Hanno (rahn))
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Scale text outside the map
Message-ID: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch>
Hello list,
I have another question. Perhaps somebody can help me.
I try to realise a Sclae text. It should be something like this 1:25000. For this I use the Scale Control.
var scale = new OpenLayers.Control.Scale({
div: document.getElementById("kartenElemente")
});
map.addControl(scale);
I want to place the Scaletext outside the map. For this I use the div Option. But it doesn't work. Can somebody please help me? Is there a possibility to place the control outside the map in an extra div?
Thank you a lot for your help.
Greetings
Hanno Rahn
------------------------------------------
Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen
Fachstelle Geoinformatik
Gr?ental, Postfach CH-8820 W?denswil
Tel +41 (0)58 934 5592
Fax +41 (0)58 934 5580
hanno.rahn@zhaw.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/ae3b51a1/attachment.html
From jansen at terrestris.de Thu Aug 6 03:11:33 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Scale text outside the map
In-Reply-To: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch>
References: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch>
Message-ID: <4A7A8225.7010808@terrestris.de>
Hi Hanno,
you need to pass in two parameters to the constructor of
OpenLayers.Control.Scale:
1. the div
2. the options-object
In your case this should work:
var scale = new OpenLayers.Control.Scale(
document.getElementById("kartenElemente"),
{
// other options
}
);
map.addControl(scale);
Regards,
Marc
Rahn Hanno (rahn) schrieb:
>
> Hello list,
>
> I have another question. Perhaps somebody can help me.
>
> I try to realise a Sclae text. It should be something like this
> 1:25000. For this I use the Scale Control.
>
> var scale = new OpenLayers.Control.Scale({
>
> div: document.getElementById("kartenElemente")
>
> });
>
> map.addControl(scale);
>
> I want to place the Scaletext outside the map. For this I use the div
> Option. But it doesn?t work. Can somebody please help me? Is there a
> possibility to place the control outside the map in an extra div?
>
> Thank you a lot for your help.
>
> Greetings
>
> Hanno Rahn
>
> ------------------------------------------
>
> Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
>
> ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und
> Nat?rliche Ressourcen
>
> Fachstelle Geoinformatik
>
> Gr?ental, Postfach CH-8820 W?denswil
>
> Tel +41 (0)58 934 5592
>
> Fax +41 (0)58 934 5580
>
> hanno.rahn@zhaw.ch
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From a.ratas at traffic-tim.de Thu Aug 6 03:12:58 2009
From: a.ratas at traffic-tim.de (Andris Ratas)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Scale text outside the map
In-Reply-To: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch>
Message-ID: <8B525634-2C14-45D0-A0E3-0656FF08415B@traffic-tim.de>
You don't even need a scale control for that. Just register with "zoomend" event of your map object and add the scale to any div element you need.
map.events.register("zoomend", map, function () {
document.getElementById('scale_div').innerHTML = map.getScale().toFixed(0);
});
Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Rahn Hanno (rahn)
Gesendet: Donnerstag, 6. August 2009 08:05
An: users@openlayers.org
Betreff: [OpenLayers-Users] Scale text outside the map
Hello list,
I have another question. Perhaps somebody can help me.
I try to realise a Sclae text. It should be something like this 1:25000. For this I use the Scale Control.
var scale = new OpenLayers.Control.Scale({
div: document.getElementById("kartenElemente")
});
map.addControl(scale);
I want to place the Scaletext outside the map. For this I use the div Option. But it doesn't work. Can somebody please help me? Is there a possibility to place the control outside the map in an extra div?
Thank you a lot for your help.
Greetings
Hanno Rahn
------------------------------------------
Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen
Fachstelle Geoinformatik
Gr?ental, Postfach CH-8820 W?denswil
Tel +41 (0)58 934 5592
Fax +41 (0)58 934 5580
hanno.rahn@zhaw.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/e4c0d7a8/attachment.html
From jansen at terrestris.de Thu Aug 6 03:14:49 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] How to make web map faster
In-Reply-To: <241626.39069.qm@web35108.mail.mud.yahoo.com>
References: <241626.39069.qm@web35108.mail.mud.yahoo.com>
Message-ID: <4A7A82E9.1070906@terrestris.de>
Hi,
the first question should be asked at the MapServer Userlist.
as for the second, I cannot think of a way of preloading to gain speed,
but maybe I am missing a point here.
Regards,
Marc
Mr. Bic Phuong schrieb:
>
>
> Dear OpenLayers Developers and Users,
>
> Currently I'm using MapServer and OpenLayers for my web map which has:
> - 1 tilecache layer (base map)
> - 17 WMS layer
>
> So there are 2 big problems:
>
> - There are 17 connections to ArcSDE Oracle in the map file. How can I
> use 01 connection for all layers ?
>
> - It's too slow to load when visitors turn on more than 2 WMS layers,
> the tilecache layer is ok but WMS layers is two slow. I'm wondering
> whether there is any way to load a part of layer or something similar
> to make it faster?
>
> Thanks for your attention and your help is highly appreciated!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Diplom-Geograph Marc Jansen
- Anwendungsentwickler -
terrestris GmbH & Co. KG
Irmintrudisstra?e 17
53111 Bonn
Tel: ++49 (0)228 / 96 28 99 -53
Fax: ++49 (0)228 / 96 28 99 -57
Email: jansen@terrestris.de
Web: http://terrestris.de
Amtsgericht Bonn, HRA 6835
Komplement?rin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams
From max.weidemann at freenet.de Thu Aug 6 04:26:39 2009
From: max.weidemann at freenet.de (Max Weidemann)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] geometry collection
Message-ID: <1249547199882-3396966.post@n2.nabble.com>
Dear openlayers users and developers,
I want to know if it is possible to show an geometry collection in an vector
layer?
If it is possible could anyone help me please with my code or tell me what
is the right way for using the geometrycollection??
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
OpenLayers Boxes Example
Boxes Example
Demonstrate marker and box type annotations on a map.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The map is shown and the layer boxes is added, but there are no geometries
shown.
--
View this message in context: http://n2.nabble.com/geometry-collection-tp3396966p3396966.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From jansen at terrestris.de Thu Aug 6 05:20:58 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] geometry collection
In-Reply-To: <1249547199882-3396966.post@n2.nabble.com>
References: <1249547199882-3396966.post@n2.nabble.com>
Message-ID: <4A7AA07A.6020207@terrestris.de>
Hi Max,
It is possible to add Geometry Collections to Vectorlayers:
var gc_geometry = new OpenLayers.Geometry.Collection(
[
new OpenLayers.Geometry.Point( ... ),
new OpenLayers.Geometry.LineString( ... ),
new OpenLayers.Geometry.Polygon( ... )
// etc.
]
);
var gc_feature = new OpenLayers.Feature.Vector( gc_geometry );
var vectorLayer = new OpenLayers.Layer.Vector( ... )
vectorLayer.addFeatures( [ gc_feature ] );
Regards,
Marc
Max Weidemann schrieb:
> Dear openlayers users and developers,
>
> I want to know if it is possible to show an geometry collection in an vector
> layer?
> If it is possible could anyone help me please with my code or tell me what
> is the right way for using the geometrycollection??
>
>
>
>
> OpenLayers Boxes Example
> type="text/css" />
>
>
>
>
>
>
>
Boxes Example
>
>
>
>
>
> Demonstrate marker and box type annotations on a map.
>
>
>
>
>
>
>
>
>
>
> The map is shown and the layer boxes is added, but there are no geometries
> shown.
>
--
Diplom-Geograph Marc Jansen
- Anwendungsentwickler -
terrestris GmbH & Co. KG
Irmintrudisstra?e 17
53111 Bonn
Tel: ++49 (0)228 / 96 28 99 -53
Fax: ++49 (0)228 / 96 28 99 -57
Email: jansen@terrestris.de
Web: http://terrestris.de
Amtsgericht Bonn, HRA 6835
Komplement?rin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams
From max.weidemann at freenet.de Thu Aug 6 05:35:01 2009
From: max.weidemann at freenet.de (Max Weidemann)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] geometry collection
In-Reply-To: <4A7AA07A.6020207@terrestris.de>
References: <1249547199882-3396966.post@n2.nabble.com>
<4A7AA07A.6020207@terrestris.de>
Message-ID: <1249551301773-3397253.post@n2.nabble.com>
Marc Jansen-2 wrote:
>
> Hi Max,
>
> It is possible to add Geometry Collections to Vectorlayers:
>
>
> var gc_geometry = new OpenLayers.Geometry.Collection(
> [
> new OpenLayers.Geometry.Point( ... ),
> new OpenLayers.Geometry.LineString( ... ),
> new OpenLayers.Geometry.Polygon( ... )
> // etc.
> ]
> );
>
> var gc_feature = new OpenLayers.Feature.Vector( gc_geometry );
>
> var vectorLayer = new OpenLayers.Layer.Vector( ... )
>
> vectorLayer.addFeatures( [ gc_feature ] );
>
> Regards,
>
> Marc
>
Thanks Marc for that quick and very very helpfull answer.
cheers
Max
--
View this message in context: http://n2.nabble.com/How-to-use-geometry-collection-tp3396966p3397253.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From jerome.freyre at hispeed.ch Thu Aug 6 05:53:38 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
Message-ID: <1249552418351-3397344.post@n2.nabble.com>
Hi List!
I have some datas in a PostgreSQL database. I recover datas trough geoserver
via a vector layer with WFS protocol like it seems to be recommended.
I can easily (after some efforts :D ) add or delete somes features but I am
unable to update a feature...
A xml sample that is posted to my geoserver :
the_geom538698.2299984342 182479.15984712465puissance125rueCOIN DE TERRE, Rue dunum_apic3974id_comb48/6id_apic141776
And the response (I put geoserver in verbose mode) :
update errorDetails:org.geoserver.wfs.WFSException: update error
at
org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
My wfs declaration :
var wfsLayer = new OpenLayers.Layer.Vector( 'lumin', {
strategies: [new OpenLayers.Strategy.BBOX(),
saveStrategy ],
projection: new
OpenLayers.Projection("EPSG:21781"),
protocol: new OpenLayers.Protocol.WFS({
version: '1.1.0',
srsName: 'EPSG:21781',
url:
'http://localhost:8080/geoserver/wfs?strict=true',
featureNS :
'http://www.openplans.org/topp',
featureType: 'lumin',
geometryName: 'the_geom',
extractAttribute:true})
});
And when I modify some feature attributes, I am doing this:
modifiedFeature.state = OpenLayers.State.UPDATE;
Am I doing something wrong?
--
View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3397344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From gary_wales at hotmail.com Thu Aug 6 06:37:26 2009
From: gary_wales at hotmail.com (gwales)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Help with getExtents()
Message-ID: <1249555046491-3397508.post@n2.nabble.com>
I am using Openlayers and OSM to show a GPX tracklog file and all loads well
with the viewport updating to a best fit of the GPX data.
I now need to get the extents of the map/layer in Lat/Lon to allow me to
query a point layer via ajax and load local content as vector points. I can
see I need the current bounds with a transform to get the four extents.
I can't get past stage one, map.getExtents() or layer.getExtents() always
return null and throw an error.
Can anyone help?
--
View this message in context: http://n2.nabble.com/Help-with-getExtents%28%29-tp3397508p3397508.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From kgeusebroek at xebia.com Thu Aug 6 06:42:49 2009
From: kgeusebroek at xebia.com (Kris Geusebroek)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
In-Reply-To: <1249552418351-3397344.post@n2.nabble.com>
References: <1249552418351-3397344.post@n2.nabble.com>
Message-ID:
Hi Jerome,
Could it be the data? The invalidParameterValue exception in combination
with the value 48/6 in the id_comb column looks a bit tricky to me.
Perhaps the / needs to be encoded or escaped or so?
Cheers Kris
-----Original Message-----
From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org]
On Behalf Of Jerome Freyre
Sent: Thursday, August 06, 2009 11:54 AM
To: users@openlayers.org
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
Hi List!
I have some datas in a PostgreSQL database. I recover datas trough
geoserver
via a vector layer with WFS protocol like it seems to be recommended.
I can easily (after some efforts :D ) add or delete somes features but I
am
unable to update a feature...
A xml sample that is posted to my geoserver :
the_geom538698.2299984342
182479.15984712465puissance125rueCOIN DE TERRE, Rue dunum_apic3974id_comb48/6id_apic141776
And the response (I put geoserver in verbose mode) :
update errorDetails:org.geoserver.wfs.WFSException: update error
at
org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionR
esponse.java:49)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712)
at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs
tractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl
e(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:875)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:809)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.java:571)
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1093)
at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharac
terEncodingFilter.java:108)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:265)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterS
ecurityInterceptor.java:107)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(Filte
rSecurityInterceptor.java:72)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTransl
ationFilter.java:124)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter
(AnonymousProcessingFilter.java:125)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProce
ssingFilter.java:174)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(H
ttpSessionContextIntegrationFilter.java:249)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:1
49)
at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java
:98)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
at
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
at
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.jav
a:163)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
16)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
ava:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:450)
My wfs declaration :
var wfsLayer = new
OpenLayers.Layer.Vector( 'lumin', {
strategies: [new
OpenLayers.Strategy.BBOX(),
saveStrategy ],
projection: new
OpenLayers.Projection("EPSG:21781"),
protocol: new
OpenLayers.Protocol.WFS({
version:
'1.1.0',
srsName:
'EPSG:21781',
url:
'http://localhost:8080/geoserver/wfs?strict=true',
featureNS :
'http://www.openplans.org/topp',
featureType: 'lumin',
geometryName: 'the_geom',
extractAttribute:true})
});
And when I modify some feature attributes, I am doing this:
modifiedFeature.state = OpenLayers.State.UPDATE;
Am I doing something wrong?
--
View this message in context:
http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3
397344p3397344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users
From igrcic at gmail.com Thu Aug 6 08:09:04 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OpenLayer SLD does not display labels
In-Reply-To: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com>
References: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com>
Message-ID:
hi,
we are talking about WMS layer here right?
If it is the case, then OpenLayers doesnt have anything to do with
it, but your server (Geoserver or whatever youre using) that generates
images, so you could find more info there
http://geoserver.org/display/GEOSDOC/LabelingOptions
and check:
10
cheers
On Thu, Aug 6, 2009 at 3:18 AM, Peter Dawn wrote:
> Hi all,
>
> I am trying to display labels on my map. But when I turn on the
> labels, all labels do not show up. When I zoom in further labels start
> showing up.
>
> What I need to do is, display all labels at the default scale, even if
> it looks all cluttered. There is a MinScaleDenominator and
> MaxScaleDenominator flag and I tried to tweak them. Even if I set the
> max scale to really high, all labels do not show up.
>
> Can somebody tell me if there is a way to do display all labels
> irrespective of the scale.
>
> Thanks.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From jerome.freyre at hispeed.ch Thu Aug 6 09:50:02 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
In-Reply-To:
References: <1249552418351-3397344.post@n2.nabble.com>
Message-ID: <1249566602523-3398368.post@n2.nabble.com>
Hi Kris,
It seems you are right... I tried to update only one column at time.
It works for all column except those one:
the_geom538698.2299984342 182479.15984712465
EXCEPTION:
org.xml.sax.SAXParseException: The prefix "gml" for element
"gml:Point" is not bound.
The prefix "gml" for element "gml:Point" is not bound.
rueCOIN DE TERRE, Rue du
EXCEPTION:
org.geoserver.wfs.WFSException: update error
at
org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
.....
Do you have an idea for those exception?
Kris Geusebroek wrote:
>
> Hi Jerome,
>
> Could it be the data? The invalidParameterValue exception in combination
> with the value 48/6 in the id_comb column looks a bit tricky to me.
> Perhaps the / needs to be encoded or escaped or so?
>
> Cheers Kris
>
>
>
--
View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3398368.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From gary_wales at hotmail.com Thu Aug 6 09:51:45 2009
From: gary_wales at hotmail.com (gwales)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Help with getExtents()
In-Reply-To: <1249555046491-3397508.post@n2.nabble.com>
References: <1249555046491-3397508.post@n2.nabble.com>
Message-ID: <1249566705555-3398377.post@n2.nabble.com>
gwales wrote:
>
> I can't get past stage one, map.getExtents() or layer.getExtents() always
> return null and throw an error.
>
I Needed to wait for OSM layer to load so put a loadend event handler to
catch the Extents.
--
View this message in context: http://n2.nabble.com/Help-with-getExtents%28%29-tp3397508p3398377.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From taviroquai at gmail.com Thu Aug 6 10:32:12 2009
From: taviroquai at gmail.com (taviroquai)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] Vectors layer over Google
Message-ID: <1249569132508-3398605.post@n2.nabble.com>
Hi all!
I'm using the sphericalMercator has recomended in
http://trac.openlayers.org/wiki/SphericalMercator
What am i doing wrong? It should be simple like this:
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var base = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP, numZoomLevels: 20, sphericalMercator:
true}
);
var wvect = new OpenLayers.Layer.GML("World Borders", "doc.kml",
{
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true,
maxDepth: 20
}
});
map.addLayers([base, wvect]);
map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 3);
The doc.kml i got from
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=300541&page=all
I would like to click on a contry and pop up information from the doc.kml.
Thanks in advance.
Marco
--
View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3398605.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From aaime at opengeo.org Thu Aug 6 10:40:28 2009
From: aaime at opengeo.org (Andrea Aime)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
In-Reply-To: <1249566602523-3398368.post@n2.nabble.com>
References: <1249552418351-3397344.post@n2.nabble.com>
<1249566602523-3398368.post@n2.nabble.com>
Message-ID: <4A7AEB5C.607@opengeo.org>
Jerome Freyre ha scritto:
> Hi Kris,
>
> It seems you are right... I tried to update only one column at time.
>
> It works for all column except those one:
>
> the_geom
>
>
> 538698.2299984342 182479.15984712465
>
>
>
> EXCEPTION:
> org.xml.sax.SAXParseException: The prefix "gml" for element
> "gml:Point" is not bound.
> The prefix "gml" for element "gml:Point" is not bound.
>
>
> rue
> COIN DE TERRE, Rue du
>
> EXCEPTION:
> org.geoserver.wfs.WFSException: update error
> at
> org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49)
> at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712)
> at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
> at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
> at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
> at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
> at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
> .....
>
> Do you have an idea for those exception?
It would seem the gml prefix has no declaration in the document?
In fact:
the_geom538698.2299984342 182479.15984712465
does not contain xmlns:gml="http://www.opengis.net/gml".
Yet, I guess it should be imported via the WFS declaration.
Btw, which version of GeoServer and OpenLayers are you using?
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
From jerome.freyre at hispeed.ch Thu Aug 6 10:47:32 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:43 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
In-Reply-To: <4A7AEB5C.607@opengeo.org>
References: <1249552418351-3397344.post@n2.nabble.com>
<1249566602523-3398368.post@n2.nabble.com>
<4A7AEB5C.607@opengeo.org>
Message-ID: <1249570052514-3398711.post@n2.nabble.com>
Hi Andrea,
I am using GeoServer 1.7.5 (for Mac) and OL 2.8
So I juste have to had the declaration
xmlns:gml="http://www.opengis.net/gml" in the tag?
aaime wrote:
>
> It would seem the gml prefix has no declaration in the document?
>
> In fact:
>
> version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
> the_geom
>
> srsName="http://www.opengis.net/gml/srs/epsg.xml#EPSG:21781">
> 538698.2299984342 182479.15984712465
>
>
>
> does not contain xmlns:gml="http://www.opengis.net/gml".
>
> Yet, I guess it should be imported via the WFS declaration.
> Btw, which version of GeoServer and OpenLayers are you using?
>
> Cheers
> Andrea
>
> --
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3398711.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From aaime at opengeo.org Thu Aug 6 11:05:42 2009
From: aaime at opengeo.org (Andrea Aime)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
In-Reply-To: <1249570052514-3398711.post@n2.nabble.com>
References: <1249552418351-3397344.post@n2.nabble.com> <1249566602523-3398368.post@n2.nabble.com> <4A7AEB5C.607@opengeo.org>
<1249570052514-3398711.post@n2.nabble.com>
Message-ID: <4A7AF146.5070400@opengeo.org>
Jerome Freyre ha scritto:
> Hi Andrea,
>
> I am using GeoServer 1.7.5 (for Mac) and OL 2.8
>
> So I juste have to had the declaration
> xmlns:gml="http://www.opengis.net/gml" in the tag?
The error message seems to point there, and in fact the
GeoServer sample transaction calls do have that declaration.
Try it, eventually just modify manually the request and submit it
before trying to find your way into the OL code.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
From Steve.Toutant at inspq.qc.ca Thu Aug 6 11:11:57 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Scale line accuracy
In-Reply-To: <4A718A57.8060107@mapgears.com>
Message-ID:
Hi,
The projection of my OL map is in epsg:900913 and displayProjection is
epsg:4326.
It seems that scaleLine control and measure control do not return good
values. The scaleline value and the measure are always higher than
expected.
For the measure control I set geodesic: true and now the results are good.
But I don't understand why I should specify geodesic: true if my map is
projected?
For the scaleLine I can't figure out why the scale is not good.
Ideas or extra info on these controls would be appreciated.
thanks,
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant@inspq.qc.ca
http://www.inspq.qc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/c4b8ab04/attachment.html
From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 6 13:32:59 2009
From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Vectors layer over Google
References: <1249569132508-3398605.post@n2.nabble.com>
Message-ID: <1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com>
http://docs.openlayers.org/library/spherical_mercator.html
read this over paying special notice to the projection transformation sections.
-----Original Message-----
From: users-bounces@openlayers.org on behalf of taviroquai
Sent: Thu 8/6/2009 10:32 AM
To: users@openlayers.org
Subject: [OpenLayers-Users] Vectors layer over Google
Hi all!
I'm using the sphericalMercator has recomended in
http://trac.openlayers.org/wiki/SphericalMercator
What am i doing wrong? It should be simple like this:
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var base = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP, numZoomLevels: 20, sphericalMercator:
true}
);
var wvect = new OpenLayers.Layer.GML("World Borders", "doc.kml",
{
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true,
maxDepth: 20
}
});
map.addLayers([base, wvect]);
map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 3);
The doc.kml i got from
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=300541&page=all
I would like to click on a contry and pop up information from the doc.kml.
Thanks in advance.
Marco
--
View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3398605.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/e65f9181/attachment.html
From arevaco90 at yahoo.es Thu Aug 6 14:44:45 2009
From: arevaco90 at yahoo.es (=?Cp1252?Q?Juan_Ar=E9valo?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] CGI and Tomcat
Message-ID: <1249584285317-3400100.post@n2.nabble.com>
Hi all,
I am making some progress setting up a WFS-T, it seems that my code works
since I don??t get any error, but the layer doesn't display in the map. I
have read that this problem can be solved by setting the Proxy Host, however
I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and
OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache
but not for Tomcat)
Does anyone have any ideas on how to solve it?
I??ve solved my previous problem with the WFS constructor.
Thanks Pierre and Eric for your help!!
Cheers!
Juan
--
View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From tommytomorow at msn.com Thu Aug 6 18:31:15 2009
From: tommytomorow at msn.com (tommy408)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Overlay layer jump durring pan
Message-ID: <1249597875535-3401129.post@n2.nabble.com>
My overlay layer keeps jumping around when I pan the map. It only does it on
Firefox. I've tried 2.6, 2.7 and 2.8. All of them do it. Anyone know how
I can fix it? It's probably somewhere in Image.js
base_layer = new OpenLayers.Layer.WMS(
"Geoserver layers - Tiled",
"http://localhost:8080/geoserver/wms",
{
height: '479',
width: '800',
layers: 'topp:custom',
styles: '',
srs: 'EPSG:4326',
format: format,
tiled: 'true',
tilesOrigin : "0,0"
},
{transitionEffect: 'resize'}
);
overlay_layer = new OpenLayers.Layer.WMS(
"Geoserver layers - Untiled",
"http://localhost:8080/geoserver/wms",
{
height: '479',
width: '800',
layers: 'topp:points',
styles: '',
srs: 'EPSG:4326',
format: format,
transparent: "true",
tilesOrigin : "0,0"
},
{singleTile: true, ratio: 1,transitionEffect: 'resize'}
);
map.addLayers([untiled,tiled]);
--
View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From patzke at geoinformationsdienst.de Fri Aug 7 04:06:19 2009
From: patzke at geoinformationsdienst.de (Fabian Patzke)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users]
=?utf-8?q?Adding_Feature_to_WFS_in_Vector_Laye?=
=?utf-8?q?r_/_Copying=09Features?=
References:
Message-ID:
I moved a bit further with my efforts.
My transaction is getting more and more
complete. But the Coordinates are still missing.
If anybody has an idea it would be great ;)
Before I try to commit a newly added feature I print out FID an geometry of the
last features of the layer I added to.
As you can see below, I get the last
feature that has been in the layer before the add (FID: bla.203) and the newly
added (FID: null).
So I do not get the reason why no geometry is in the transaction.
FID: bla.203 #202: MULTIPOLYGON(((3440276.57 5791250.12,3440243.1
5791360.32,3440244.73 5791414.19,3440263.51 5791485.21,3440359.01
5791523.57,3440515.73 5791495.82,3440598.82 5791494.96,3440609.43
5791557.01,3440700.07 5791522.72,3440704.15 5791588.86,3440841.91
5791548.07,3440823.94 5791481.1,3440917.87 5791429.64,3440917.87
5791415.75,3440753.7 5791349.59,3440813.05 5791255.64,3440910.28
5791228.67,3440902.11 5791175.56,3440840.83 5791161.67,3440837.56
5791179.65,3440797.52 5791174.75,3440737.06 5791121.64,3440659.11
5791106.1,3440650.94 5791142.88,3440556.13 5791270.38,3440455.76
5791170.57,3440434.5 5791204.92,3440467.21 5791245.82,3440447.58
5791284.26,3440392.79 5791288.35,3440289.74 5791259.72,
3440276.57 5791250.12)))
FID: null #203: MULTIPOLYGON(((3302091.4993788 5913241.9002485,
3287274.8407132 5864558.5932041,3334547.0374084 5856797.486284,
3360652.578867 5906891.9036775,3302091.4993788 5913241.9002485)))
Any help would be nice.
Greetings,
Fabian
From michogar at gmail.com Fri Aug 7 04:30:58 2009
From: michogar at gmail.com (Micho Gar)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] CGI and Tomcat
In-Reply-To: <1249584285317-3400100.post@n2.nabble.com>
References: <1249584285317-3400100.post@n2.nabble.com>
Message-ID: <5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com>
Hola Arevalo,
tienes esta tutorial que segu? yo para utilizar el proxy cgi en tomcat.
http://codigoaldescubierto.wordpress.com/2008/02/24/cgis-en-tomcat-bajo-windows/
Saludos.
El 6 de agosto de 2009 20:44, Juan Ar?valo escribi?:
>
> Hi all,
>
> I am making some progress setting up a WFS-T, it seems that my code works
> since I don??t get any error, but the layer doesn't display in the map. I
> have read that this problem can be solved by setting the Proxy Host,
> however
> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and
> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache
> but not for Tomcat)
>
> Does anyone have any ideas on how to solve it?
>
> I??ve solved my previous problem with the WFS constructor.
> Thanks Pierre and Eric for your help!!
>
> Cheers!
>
> Juan
> --
> View this message in context:
> http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
# michogar
# Analista Programador SIG
# GNU/Linux Counter 462666
# http://www.openstreetmap.org/user/michogar
Una visi?n personal:
http://michogar.blogspot.com
El d?a a d?a:
http://twitter.com/michogar
Sent from Madrid, Spain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/dc5cb9bf/attachment.html
From adrian_gh.popa at romtelecom.ro Fri Aug 7 05:01:44 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] What is the relationship between zoom level and
longitude/latitude
Message-ID: <4A7BED78.1060907@romtelecom.ro>
Hello everybody.
I'm trying to zoom to view an area for which I have the minimum and
maximum longitude/latitude. Basically I would like to zoom in to see a
rectangle with known coordinates. I already calculated the center of
this rectangle - so that's not a problem - the map centers beautifully
to that.
The problem is: I have to find out which minimum zoom setting would
allow my area to be fully visible - so I need to choose a zoom setting.
There must be a relationship between the difference in longitude (or
latitude) to a zoom level.
I wonder if anyone knows this relationship - or should I determine it
empirically.
Thank you.
By the way, my map is using spherical mercator projection, but my
coordinates are in longitude/latitude (although there is no problem in
converting them...).
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
From igrcic at gmail.com Fri Aug 7 06:31:22 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Overlay layer jump durring pan
In-Reply-To: <1249597875535-3401129.post@n2.nabble.com>
References: <1249597875535-3401129.post@n2.nabble.com>
Message-ID:
Hi, you should put ratio in untiled layer to some bigger value, at
least 1.4 or so.
And what excalty does it mean 'jumping' ? :)
On Fri, Aug 7, 2009 at 12:31 AM, tommy408 wrote:
>
> My overlay layer keeps jumping around when I pan the map. ?It only does it on
> Firefox. ?I've tried 2.6, 2.7 and 2.8. ?All of them do it. ?Anyone know how
> I can fix it? ?It's probably somewhere in ?Image.js
>
>
> ? ? ? ? ? ? ? ?base_layer = new OpenLayers.Layer.WMS(
> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Tiled",
> "http://localhost:8080/geoserver/wms",
> ? ? ? ? ? ? ? ? ? ?{
> ? ? ? ? ? ? ? ? ? ? ? ?height: '479',
> ? ? ? ? ? ? ? ? ? ? ? ?width: '800',
> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:custom',
> ? ? ? ? ? ? ? ? ? ? ? ?styles: '',
> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326',
> ? ? ? ? ? ? ? ? ? ? ? ?format: format,
> ? ? ? ? ? ? ? ? ? ? ? ?tiled: 'true',
> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0"
> ? ? ? ? ? ? ? ? ? ?},
> ? ? ? ? ? ? ? ? ? ?{transitionEffect: 'resize'}
> ? ? ? ? ? ? ? ?);
>
>
> ? ? ? ? ? ? ? ?overlay_layer = new OpenLayers.Layer.WMS(
> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Untiled",
> "http://localhost:8080/geoserver/wms",
> ? ? ? ? ? ? ? ? ? ?{
> ? ? ? ? ? ? ? ? ? ? ? ?height: '479',
> ? ? ? ? ? ? ? ? ? ? ? ?width: '800',
> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:points',
> ? ? ? ? ? ? ? ? ? ? ? ?styles: '',
> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326',
> ? ? ? ? ? ? ? ? ? ? ? ?format: format,
> ? ? ? ? ? ? ? ? ? ? ? ?transparent: "true",
> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0"
> ? ? ? ? ? ? ? ? ? ?},
> ? ? ? ? ? ? ? ? ? ?{singleTile: true, ratio: 1,transitionEffect: 'resize'}
> ? ? ? ? ? ? ? ?);
>
> ? ? ? ? ? ? ? ?map.addLayers([untiled,tiled]);
>
> --
> View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From patzke at geoinformationsdienst.de Fri Aug 7 06:32:55 2009
From: patzke at geoinformationsdienst.de (Fabian Patzke)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users]
=?utf-8?q?What_is_the_relationship_between_zoo?=
=?utf-8?q?m_level_and=09longitude/latitude?=
References: <4A7BED78.1060907@romtelecom.ro>
Message-ID:
Adrian Popa writes:
>
> Hello everybody.
>
> I'm trying to zoom to view an area for which I have the minimum and
> maximum longitude/latitude. Basically I would like to zoom in to see a
> rectangle with known coordinates. I already calculated the center of
> this rectangle - so that's not a problem - the map centers beautifully
> to that.
Don't try it the hard way :)
Take the zoomToExtent() function an
var zoomExtent = new OpenLayers.Bounds(left, bottom, right, top);
map.zoomToExtent(zoomExtent);
maybe you need to transform zommExtent first.
I hope that helps.
Greetings,
Fabian
From tommytomorow at msn.com Fri Aug 7 06:40:32 2009
From: tommytomorow at msn.com (tommy408)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Overlay layer jump durring pan
In-Reply-To:
References: <1249597875535-3401129.post@n2.nabble.com>
Message-ID: <1249641632440-3403584.post@n2.nabble.com>
Oh thanks a lot Ivan. I put 2.0 ratio earlier and it fixed it. I just
didn't understand why.
By jumping I meant the overlay layer shifts for a split second to a
different spot before adjusting to the correct spot.
Ivan Grcic-2 wrote:
>
> Hi, you should put ratio in untiled layer to some bigger value, at
> least 1.4 or so.
>
> And what excalty does it mean 'jumping' ? :)
>
> On Fri, Aug 7, 2009 at 12:31 AM, tommy408 wrote:
>>
>> My overlay layer keeps jumping around when I pan the map. ?It only does
>> it on
>> Firefox. ?I've tried 2.6, 2.7 and 2.8. ?All of them do it. ?Anyone know
>> how
>> I can fix it? ?It's probably somewhere in ?Image.js
>>
>>
>> ? ? ? ? ? ? ? ?base_layer = new OpenLayers.Layer.WMS(
>> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Tiled",
>> "http://localhost:8080/geoserver/wms",
>> ? ? ? ? ? ? ? ? ? ?{
>> ? ? ? ? ? ? ? ? ? ? ? ?height: '479',
>> ? ? ? ? ? ? ? ? ? ? ? ?width: '800',
>> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:custom',
>> ? ? ? ? ? ? ? ? ? ? ? ?styles: '',
>> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326',
>> ? ? ? ? ? ? ? ? ? ? ? ?format: format,
>> ? ? ? ? ? ? ? ? ? ? ? ?tiled: 'true',
>> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0"
>> ? ? ? ? ? ? ? ? ? ?},
>> ? ? ? ? ? ? ? ? ? ?{transitionEffect: 'resize'}
>> ? ? ? ? ? ? ? ?);
>>
>>
>> ? ? ? ? ? ? ? ?overlay_layer = new OpenLayers.Layer.WMS(
>> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Untiled",
>> "http://localhost:8080/geoserver/wms",
>> ? ? ? ? ? ? ? ? ? ?{
>> ? ? ? ? ? ? ? ? ? ? ? ?height: '479',
>> ? ? ? ? ? ? ? ? ? ? ? ?width: '800',
>> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:points',
>> ? ? ? ? ? ? ? ? ? ? ? ?styles: '',
>> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326',
>> ? ? ? ? ? ? ? ? ? ? ? ?format: format,
>> ? ? ? ? ? ? ? ? ? ? ? ?transparent: "true",
>> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0"
>> ? ? ? ? ? ? ? ? ? ?},
>> ? ? ? ? ? ? ? ? ? ?{singleTile: true, ratio: 1,transitionEffect:
>> 'resize'}
>> ? ? ? ? ? ? ? ?);
>>
>> ? ? ? ? ? ? ? ?map.addLayers([untiled,tiled]);
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
>
> --
> Ivan Grcic
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3403584.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From ks at geograf.dk Fri Aug 7 07:24:51 2009
From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] What is the relationship between zoom level
and longitude/latitude
In-Reply-To: <4A7BED78.1060907@romtelecom.ro>
References: <4A7BED78.1060907@romtelecom.ro>
Message-ID: <4A7C0F03.1060406@geograf.dk>
There is a function just for that:
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent
If you need the value, you can call this:
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent
You can examine the code if you are interested in the inner workings of
calculating a zoom level from a rectangle.
Regards, Kenneth Skovhede, GEOGRAF A/S
Adrian Popa skrev:
> Hello everybody.
>
> I'm trying to zoom to view an area for which I have the minimum and
> maximum longitude/latitude. Basically I would like to zoom in to see a
> rectangle with known coordinates. I already calculated the center of
> this rectangle - so that's not a problem - the map centers beautifully
> to that.
>
> The problem is: I have to find out which minimum zoom setting would
> allow my area to be fully visible - so I need to choose a zoom setting.
> There must be a relationship between the difference in longitude (or
> latitude) to a zoom level.
>
> I wonder if anyone knows this relationship - or should I determine it
> empirically.
>
> Thank you.
>
> By the way, my map is using spherical mercator projection, but my
> coordinates are in longitude/latitude (although there is no problem in
> converting them...).
>
>
From adrian_gh.popa at romtelecom.ro Fri Aug 7 07:57:11 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] What is the relationship between zoom level
and longitude/latitude
In-Reply-To: <4A7C0F03.1060406@geograf.dk>
References: <4A7BED78.1060907@romtelecom.ro> <4A7C0F03.1060406@geograf.dk>
Message-ID: <4A7C1697.4010402@romtelecom.ro>
Thank you all for your help,
I used zoomToExtent and it worked great...
Kenneth Skovhede, GEOGRAF A/S wrote:
> There is a function just for that:
> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent
>
>
> If you need the value, you can call this:
> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent
>
>
> You can examine the code if you are interested in the inner workings
> of calculating a zoom level from a rectangle.
>
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
>
>
> Adrian Popa skrev:
>> Hello everybody.
>>
>> I'm trying to zoom to view an area for which I have the minimum and
>> maximum longitude/latitude. Basically I would like to zoom in to see
>> a rectangle with known coordinates. I already calculated the center
>> of this rectangle - so that's not a problem - the map centers
>> beautifully to that.
>>
>> The problem is: I have to find out which minimum zoom setting would
>> allow my area to be fully visible - so I need to choose a zoom
>> setting. There must be a relationship between the difference in
>> longitude (or latitude) to a zoom level.
>>
>> I wonder if anyone knows this relationship - or should I determine it
>> empirically.
>>
>> Thank you.
>>
>> By the way, my map is using spherical mercator projection, but my
>> coordinates are in longitude/latitude (although there is no problem
>> in converting them...).
>>
>>
>
From Brian at neworleansgis.com Fri Aug 7 12:01:10 2009
From: Brian at neworleansgis.com (BrianJ)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Simple Layer Visibility Problem...
Message-ID: <1249660870078-3405211.post@n2.nabble.com>
Hi Everyone, I'm really excited to have started working with OpenLayers and
all the frustrations I'm sure to experience.
I have a real beginner problem here... I'm simply trying to turn a layer on
or off with a form check button, and it's not working, searched the forum
and can't seem to solve the problem...
Thanks
The full code is located here: http://www.brianjamesbaldwin.com/Map/
or...
var parisoaks = new OpenLayers.Layer.GML("KML", "kml/PO.kml", {
format: OpenLayers.Format.KML
})
map.addLayers([parisoaks]);
parisoaks.setVisibility(false);
}
function Lakeview() {
if (visible === true) {
parisoaks.setVisibility(true);
} else {
parisoaks.setVisibility(false);
}
--
View this message in context: http://n2.nabble.com/Simple-Layer-Visibility-Problem...-tp3405211p3405211.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From bartvde at osgis.nl Fri Aug 7 12:11:26 2009
From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS))
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Simple Layer Visibility Problem...
In-Reply-To: <1249660870078-3405211.post@n2.nabble.com>
References: <1249660870078-3405211.post@n2.nabble.com>
Message-ID: <4A7C522E.2020402@osgis.nl>
Hi,
check out Firebug and you'll see the error:
visible is not defined
http://www.brianjamesbaldwin.com/Map/
Line 56
Try something like:
function Lakeview() {
parisoaks.setVisibility(document.forms[0].Lakeview.checked);
}
Best regards,
Bart
BrianJ wrote:
> Hi Everyone, I'm really excited to have started working with OpenLayers and
> all the frustrations I'm sure to experience.
>
> I have a real beginner problem here... I'm simply trying to turn a layer on
> or off with a form check button, and it's not working, searched the forum
> and can't seem to solve the problem...
>
> Thanks
>
> The full code is located here: http://www.brianjamesbaldwin.com/Map/
>
> or...
>
> var parisoaks = new OpenLayers.Layer.GML("KML", "kml/PO.kml", {
> format: OpenLayers.Format.KML
> })
> map.addLayers([parisoaks]);
> parisoaks.setVisibility(false);
>
>
>
> }
>
> function Lakeview() {
> if (visible === true) {
> parisoaks.setVisibility(true);
> } else {
> parisoaks.setVisibility(false);
> }
>
>
>
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde@osgis.nl
http://www.osgis.nl
From valemunoz at gmail.com Fri Aug 7 12:25:52 2009
From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap
Message-ID: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com>
HI
when the map will be charge, can the LayerSwitcher and OverviewMap be
open?
RG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/7e839981/attachment.html
From bartvde at osgis.nl Fri Aug 7 12:35:43 2009
From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS))
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap
In-Reply-To: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com>
References: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com>
Message-ID: <4A7C57DF.1070902@osgis.nl>
Hi,
please check out:
http://openlayers.org/pipermail/users/2007-October/003405.html
Best regards,
Bart
Valeria Mu?oz wrote:
> HI
>
> when the map will be charge, can the LayerSwitcher and OverviewMap
> be open?
>
> RG
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde@osgis.nl
http://www.osgis.nl
From valemunoz at gmail.com Fri Aug 7 12:39:02 2009
From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap
In-Reply-To: <4A7C57DF.1070902@osgis.nl>
References: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com>
<4A7C57DF.1070902@osgis.nl>
Message-ID: <4b56aefe0908070939y2d9bb0efs8fdf6a2983ab097@mail.gmail.com>
thanks!!
RG
2009/8/7 Bart van den Eijnden (OSGIS)
> Hi,
>
> please check out:
>
> http://openlayers.org/pipermail/users/2007-October/003405.html
>
> Best regards,
> Bart
>
> Valeria Mu?oz wrote:
>
>> HI
>> when the map will be charge, can the LayerSwitcher and OverviewMap be
>> open?
>> RG
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> bartvde@osgis.nl
> http://www.osgis.nl
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/63ce6de6/attachment.html
From joao.c.duarte at co.sapo.pt Fri Aug 7 14:29:32 2009
From: joao.c.duarte at co.sapo.pt (Joao Duarte)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Label position on vector features
Message-ID: <005501ca178d$0234c200$069e4600$@c.duarte@co.sapo.pt>
Hi list,
Is there any way to position the label of a vector feature besides the
labelAlign property?
I have a vector feature which is a point having an externalGraphic and what
I really would like to do is to specify an offset the label should have
relative to the feature centroid.
I checked the drawText method in the Renderers (VML and SVG) and they
determine the position of the label by the feature centroid. But don?t let
the user specify a custom offset.
Has anyone thought about this? A simple patch on the drawText method would
do this:
var x = (location.x / resolution + this.left + style.labelOffsetX);
var y = (location.y / resolution - this.top - style.labelOffsetY);
Am I right?
Jo?o Duarte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/2b2b9955/attachment.html
From dresel at gmx.at Fri Aug 7 16:08:51 2009
From: dresel at gmx.at (Dresel)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] ClusterStrategy Problem
Message-ID: <1249675731433-3406487.post@n2.nabble.com>
Hi,
i want to use ClusterStrategy with VectorLayer. My Layer is generated like
this:
OpenLayers Example
This works, points are drawn. Now i add a stylemap and the ClusterStrategy
(from the ClusterExample):
OpenLayers Example
This doesn't show any points at all. What did i do wrong?
Thanks for help,
Dresel
--
View this message in context: http://n2.nabble.com/ClusterStrategy-Problem-tp3406487p3406487.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From eric.lemoine at camptocamp.com Fri Aug 7 16:14:43 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] CGI and Tomcat
In-Reply-To: <1249584285317-3400100.post@n2.nabble.com>
References: <1249584285317-3400100.post@n2.nabble.com>
Message-ID:
On Thursday, August 6, 2009, Juan Ar?valo wrote:
>
> Hi all,
>
> I am making some progress setting up a WFS-T, it seems that my code works
> since I don??t get any error, but the layer doesn't display in the map. I
> have read that this problem can be solved by setting the Proxy Host, however
> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and
> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache
> but not for Tomcat)
>
> Does anyone have any ideas on how to solve it?
Hi. If your Tomcat instance serves both the HTML page and the WFS then
you don't need a proxy.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From rodolfoamoreno at gmail.com Fri Aug 7 18:35:05 2009
From: rodolfoamoreno at gmail.com (Rodolfo Moreno)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Bug in Google with overaly example
Message-ID: <1249684505845-3407076.post@n2.nabble.com>
Hi all,
The google with overlay example from "http://openlayers.org/dev/examples/"
is working incorrectly. The bug is not only because the worldmap is not
loaded correctly but also because this is covering whole the map and thus
the google layer is not showed, just the worldmap is showed. if you turn off
the worldmap layer then it's possible to view the google layer. I realized
about it because I have a similar example overlaping google maps with
mapguide layers and 3 months ago this sample worked appropriately (in that
moment the last release was 2.6 version) and now I got the same bug, it
means that mapguide layers covers whole map that don't enable to view the
google layers.
has anyone run into with this?
Regards,
-----
Rodolfo Moreno
CivilEng
--
View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3407076.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From emckenna at phase2technology.com Fri Aug 7 20:02:16 2009
From: emckenna at phase2technology.com (Eric Mckenna)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] centerLayerContainer is setting pixel center to
0, 0
Message-ID: <14007067.1491249689731847.JavaMail.eric@emacbook.local>
I've been through this for two days now and can't get this figured out. I can see why it's happening, but everything I see online about calling Gmap.checkResize() doesn't fix this particular problem.
This bug happens about 90% of the time, the other 10% the map renders correctly and gets the correct center.
For my popup, I'm using the JS Tools overlay.
What my popup and map look like.
http://skitch.com/emackn/b4ue9/offcentermap
Here's my debug output.
http://skitch.com/emackn/b4ues/centerlayercontainer-debug
Here's how I call centerLayerContainer:
===============================================
function hotspotsLaunchDetails(anchor) {
$.getJSON($(anchor).attr("href"),
function(data) {
$('#hotspot-overlay-map').html('');
hotspotsRenderDetailMap("hotspot-overlay-map", data.hotspot);
var map = Drupal.hotspotsMap['hotspot-overlay-map'];
var lat = Number(data.hotspot.latitude);
var lon = Number(data.hotspot.longitude);
var hotspot = new OpenLayers.LonLat(lon, lat);
debugger;
// I added this here since the map should always be available after rendering.
map.centerLayerContainer(hotspot);
//map.updateSize();
}
);
Drupal.hotspotOverlay.load();
return false;
}
and where I set up my map.
===============================================
function hotspotsRenderDetailMap(id, config) {
var lat = Number(config.latitude);
var lon = Number(config.longitude);
var zoom = Number(config.zoom);
var image = config.marker;
var hotspot = new OpenLayers.LonLat(lon, lat);
OpenLayers.ImgPath = config.imgpath;
var map = new OpenLayers.Map(id, {
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.LayerSwitcher()
],
});
// In case something needs to get at this later
if (!Drupal.hotspotsMap) {
Drupal.hotspotsMap = [];
}
Drupal.hotspotsMap[id] = map;
var google = new OpenLayers.Layer.Google(
"Google Hybrid",
{ type: G_HYBRID_MAP,
numZoomLevels: 18,
}
);
map.addLayer(google);
//google.setMapObjectCenter(hotspot, zoom);
if (!map.getCenter()) {
//var epsg4326 = new OpenLayers.Projection("EPSG:4326");
var epsg3785 = new OpenLayers.Projection("EPSG:3785");
//hotspot.transform(epsg4326, map.getProjectionObject());
hotspot.transform(epsg3785, map.getProjectionObject());
map.setCenter(hotspot, zoom);
//google.setMapObjectCenter(hotspot, zoom);
}
// MARKERS AND KML
...
map.setLayerIndex(markers, 100);
map.centerLayerContainer(hotspot);
map.updateSize();
}
--
Eric Mckenna
Software Engineer
Phase2 Technology
direct: 703.548.6050,110
emckenna@phase2technology.com
www.phase2technology.com
Web solutions that fit your business.
From arnd.wippermann at web.de Sat Aug 8 05:30:29 2009
From: arnd.wippermann at web.de (Arnd Wippermann)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Label position on vector features
In-Reply-To: <005501ca178d$0234c200$069e4600$@c.duarte@co.sapo.pt>
Message-ID:
Hi,
i do exactly the same to get the labels positioned. Otherwise the labels
would hide the symbols for my point features. I would also like this patch,
but I'm not sure, if it is compatible with SLD.
Arnd
_____
Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im
Auftrag von Joao Duarte
Gesendet: Freitag, 7. August 2009 20:30
An: users@openlayers.org
Betreff: [OpenLayers-Users] Label position on vector features
Hi list,
Is there any way to position the label of a vector feature besides the
labelAlign property?
I have a vector feature which is a point having an externalGraphic and what
I really would like to do is to specify an offset the label should have
relative to the feature centroid.
I checked the drawText method in the Renderers (VML and SVG) and they
determine the position of the label by the feature centroid. But don?t let
the user specify a custom offset.
Has anyone thought about this? A simple patch on the drawText method would
do this:
var x = (location.x / resolution + this.left + style.labelOffsetX);
var y = (location.y / resolution - this.top - style.labelOffsetY);
Am I right?
Jo?o Duarte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090808/3c2e54db/attachment.html
From vedsur at yahoo.com Sat Aug 8 23:49:06 2009
From: vedsur at yahoo.com (Suresh)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Blank Postgis Mapserver layer
Message-ID: <1249789746708-3411407.post@n2.nabble.com>
Hi!
I am trying a simple example to draw a postgis layer using Mapserver
5.4(MS4W) and Openlayers 2.7. I am not getting the usual pink screen. When I
right click and select 'View Image', there is no mapserver error. Hence, I
am assuming that the image is drawn. However, there is no object in the
image.
I am reproducing mapfile and the HTML file below.
Mapfile
-------
NAME "mumbai"
UNITS DD
EXTENT 72.777 18.901034910 73.046 19.308258
SIZE 640 480
IMAGECOLOR 189 202 222
IMAGETYPE PNG
# Web Object
WEB
TEMPLATE "/ms4w/apache/htdocs/vedsur/postgis.php"
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
END
# PostGIS layer
LAYER
CONNECTIONTYPE postgis
NAME "Roads"
CONNECTION "user=suresh password=suresh dbname=ios host=localhost"
DATA "stretch_geom from stretch"
STATUS ON
TYPE LINE
CLASS
color 255 0 255
END
END # Layer
END # Mapfile
HTML Template
--------------
var lon = 72.90;
var lat = 19.11;
var zoom = 10;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
var Layer = new OpenLayers.Layer.MapServer( "Circle",
"http://localhost/cgi-bin/mapserv.exe", {map:
'/ms4w/apache/htdocs/vedsur/MumbaiPG.map'}, {gutter: 15});
map.addLayer(Layer);
map.setCenter( new OpenLayers.LonLat(lon, lat), zoom);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.addControl( new OpenLayers.Control.MousePosition() );
body onload="init()"
div id="map" class="smallmap"
/div
------------------------------------------------------------
I have tried googling (and this forum) for two days before putting this
post. Any help is welcome.
Thanks
Suresh
--
View this message in context: http://n2.nabble.com/Blank-Postgis-Mapserver-layer-tp3411407p3411407.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090808/04181c7f/attachment.html
From vedsur at yahoo.com Sun Aug 9 09:41:34 2009
From: vedsur at yahoo.com (Suresh Nimbalkar)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Blank PostGIS Layer with Openlayers
Message-ID: <430928.8780.qm@web94908.mail.in2.yahoo.com>
I am trying to display a simple postgis road layer with Mapserver 5 and Openlayers. I am not getting the PINK screen, suggesting success in layer drawing. However, the map is blank. I know that the postgis is installed properly since I do a bit of GIS computations with the data stored in it with PHP..
The important parts of map files are provided belowLAYER
??? NAME??? ??? ??? ??? "Roads"
??? CONNECTIONTYPE??? POSTGIS
??? CONNECTION??? ??? "user=suresh password=suresh dbname=sitedatabase host=localhost port=5432"
??? DATA??? ??? ??? ??? "stretch_geom from stretch"
??? STATUS??? ??? ??? ON
??? TYPE??? ??? ??? ??? LINE
??? CLASS
??? ??? color ??? ??? 255 0 255
??? END
END # Layer
The HTML template is a standard one with the following line in init() function
??? ?? ??? map = new OpenLayers.Map( 'map' );
??? ?? ??? var layer1 = new OpenLayers.Layer.MapServer( "Circle", "http://localhost/cgi-bin/mapserv", {map: '/var/www/vedsur/MumbaiPG.map'}, {gutter: 15});
??? ?? ??? map.addLayer(layer1);
Have been struggline with this problem for a while. Please help.
Thanks and regards,
Suresh
See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/e70c7ee1/attachment.html
From jansen at terrestris.de Sun Aug 9 09:52:35 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Blank PostGIS Layer with Openlayers
In-Reply-To: <430928.8780.qm@web94908.mail.in2.yahoo.com>
References: <430928.8780.qm@web94908.mail.in2.yahoo.com>
Message-ID: <4A7ED4A3.4050007@terrestris.de>
Hi Suresh,
Have you tested the UMN Layer? (e.g. with shp2img) If it is not
working, the mapserver userlist might help.
If the layer works, provide an URL sent to Mapserver by OpenLayers.
Firebug might help.
Regards, Marc
Suresh Nimbalkar schrieb:
> I am trying to display a simple postgis road layer with Mapserver 5
> and Openlayers. I am not getting the PINK screen, suggesting success
> in layer drawing. However, the map is blank. I know that the postgis
> is installed properly since I do a bit of GIS computations with the
> data stored in it with PHP.
>
> The important parts of map files are provided belowLAYER
> NAME "Roads"
> CONNECTIONTYPE POSTGIS
> CONNECTION "user=suresh password=suresh dbname=sitedatabase
> host=localhost port=5432"
> DATA "stretch_geom from stretch"
> STATUS ON
> TYPE LINE
> CLASS
> color 255 0 255
> END
> END # Layer
>
> The HTML template is a standard one with the following line in init()
> function
>
> map = new OpenLayers.Map( 'map' );
> var layer1 = new OpenLayers.Layer.MapServer( "Circle",
> "http://localhost/cgi-bin/mapserv", {map:
> '/var/www/vedsur/MumbaiPG.map'}, {gutter: 15});
> map.addLayer(layer1);
>
> Have been struggline with this problem for a while. Please help.
>
> Thanks and regards,
> Suresh
>
>
> ------------------------------------------------------------------------
> Love Cricket? Check out live scores, photos, video highlights and
> more. Click here
> .
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From joao.c.duarte at co.sapo.pt Sun Aug 9 15:44:44 2009
From: joao.c.duarte at co.sapo.pt (=?iso-8859-1?Q?Jo=E3o_Duarte?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Label position on vector features
Message-ID: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt>
Hi,
Can anyone say if such a patch would be incompatible with SLD?
Jo?o Duarte
De: Arnd Wippermann [mailto:arnd.wippermann@web.de]
Enviada: s?bado, 8 de Agosto de 2009 10:30
Para: Joao Campos Duarte (PRIMEIT)
Cc: users@openlayers.org
Assunto: AW: [OpenLayers-Users] Label position on vector features
Hi,
i do exactly the same to get the labels positioned. Otherwise the labels
would hide the symbols for my point features. I would also like this patch,
but I'm not sure, if it is compatible with SLD.
Arnd
_____
Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im
Auftrag von Joao Duarte
Gesendet: Freitag, 7. August 2009 20:30
An: users@openlayers.org
Betreff: [OpenLayers-Users] Label position on vector features
Hi list,
Is there any way to position the label of a vector feature besides the
labelAlign property?
I have a vector feature which is a point having an externalGraphic and what
I really would like to do is to specify an offset the label should have
relative to the feature centroid.
I checked the drawText method in the Renderers (VML and SVG) and they
determine the position of the label by the feature centroid. But don?t let
the user specify a custom offset.
Has anyone thought about this? A simple patch on the drawText method would
do this:
var x = (location.x / resolution + this.left + style.labelOffsetX);
var y = (location.y / resolution - this.top - style.labelOffsetY);
Am I right?
Jo?o Duarte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/a79e38e6/attachment.html
From surya.tarigan at yahoo.com Sun Aug 9 23:41:52 2009
From: surya.tarigan at yahoo.com (Surya Tarigan)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] (no subject)
Message-ID: <936918.87100.qm@web111920.mail.gq1.yahoo.com>
dear list,
?
I have wms layer with 100 different river names. I am looking script example, where?i can click certain river ?name from dropdown list and the cursor fly to the specified river.
?
best regards,
?
surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/3d2d7892/attachment.html
From redetin at gmail.com Mon Aug 10 06:08:51 2009
From: redetin at gmail.com (Jani Tiainen)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Modifying existing feature selecting it by code
and then modify and save
Message-ID: <4A7FF1B3.80402@gmail.com>
I'm trying to achieve "select by code" and "start modify" functionality
to my OL webapp.
I've form that user selects on feature to be editable, clicks "edit" and
then OL vector layer should be in "edit mode". When done editing changes
are just saved with simply clicking "save" button on a same form.
I haven't been succesful with modifying existing tools. It seems that
they require always that feature is selected from vector layer (with
mouse) before any modification happen and then modification ends by
clicking outside of element.
Is there simple way to achieve something I'm looking for or do I need to
develop set of own tools to get wanted functionality?
--
Jani Tiainen
From disiron at ya.ru Mon Aug 10 06:12:11 2009
From: disiron at ya.ru (=?UTF-8?B?SdCvT04=?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Virtual Earth layer: Layers disagreement
Message-ID: <136511249899131@webmail107.yandex.ru>
Good day! I'm newbie in OpenLayers. I'm using VE layer to track some points.
Conditions:
1. Draw some points & lines between them
2. Set zoom to min.value
3. Move map with dragging to extreme left position (for example)
Results:
1. Base layer haven't moved at all (because map can be visible wholly with minimal zoom & there's no need to move it)
2. Markers have stayed on the correct positions with a map.
3. Lines have moved according to mouse offset. But it's wrong. They must stay with marker's and base layers.
Could you please give me a hint, what can be wrong in my actions?
I place my code below:
map = new OpenLayers.Map("map", mapOptions);
veLayer = new OpenLayers.Layer.VirtualEarth("Virtual Earth Raods", { 'type': VEMapStyle.Road, 'sphericalMercator': true, numZoomLevels: veMaxZoom });
layerLines = new OpenLayers.Layer.Vector("Lines");
..
// Get polylines for particular tracks
function GetLines(groupedTracks) {
..
$(groupItem.TrackData).each(function() {
var point = new OpenLayers.Geometry.Point(this.lon, this.lat);
OpenLayers.Projection.transform(point, new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
layerPoints.push(point);
});
lines.push(new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Collection(new OpenLayers.Geometry.LineString(layerPoints)),
null, GetLineStyle(this)));
});
return lines;
}
From ahocevar at opengeo.org Mon Aug 10 08:36:07 2009
From: ahocevar at opengeo.org (Andreas Hocevar)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Label position on vector features
In-Reply-To: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt>
References: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt>
Message-ID: <4A801437.8020602@opengeo.org>
Jo?o Duarte wrote:
>
> Hi,
>
>
>
> Can anyone say if such a patch would be incompatible with SLD?
>
To me it looks like this is exactly what the sld DisplacementX and
DisplacementY properties do.
If you want to have this in OpenLayers, please provide a patch
(preferably with unit tests and sld reader/writer). See
http://trac.openlayers.org/wiki/HowToContribute.
Thanks!
Andreas.
>
>
> Jo?o Duarte
>
>
>
> *De:* Arnd Wippermann [mailto:arnd.wippermann@web.de]
> *Enviada:* s?bado, 8 de Agosto de 2009 10:30
> *Para:* Joao Campos Duarte (PRIMEIT)
> *Cc:* users@openlayers.org
> *Assunto:* AW: [OpenLayers-Users] Label position on vector features
>
>
>
> Hi,
>
>
>
> i do exactly the same to get the labels positioned. Otherwise the
> labels would hide the symbols for my point features. I would also like
> this patch, but I'm not sure, if it is compatible with SLD.
>
>
>
> Arnd
>
>
>
> ------------------------------------------------------------------------
>
> *Von:* users-bounces@openlayers.org
> [mailto:users-bounces@openlayers.org] *Im Auftrag von *Joao Duarte
> *Gesendet:* Freitag, 7. August 2009 20:30
> *An:* users@openlayers.org
> *Betreff:* [OpenLayers-Users] Label position on vector features
>
> Hi list,
>
>
>
> Is there any way to position the label of a vector feature besides the
> labelAlign property?
>
>
>
> I have a vector feature which is a point having an externalGraphic and
> what I really would like to do is to specify an offset the label
> should have relative to the feature centroid.
>
>
>
> I checked the drawText method in the Renderers (VML and SVG) and they
> determine the position of the label by the feature centroid. But don?t
> let the user specify a custom offset.
>
>
>
> Has anyone thought about this? A simple patch on the drawText method
> would do this:
>
>
>
> var x = (location.x / resolution + this.left + style.labelOffsetX);
>
> var y = (location.y / resolution - this.top - style.labelOffsetY);
>
>
>
> Am I right?
>
>
>
> Jo?o Duarte
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
From adube at mapgears.com Mon Aug 10 08:37:11 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] (no subject)
In-Reply-To: <936918.87100.qm@web111920.mail.gq1.yahoo.com>
References: <936918.87100.qm@web111920.mail.gq1.yahoo.com>
Message-ID: <4A801477.1070905@mapgears.com>
Hi,
You could make your wms layer wfs compatible and make a getFeature
request when your page loads. Then, for each returned feature, get the
'name' and 'bbox' of the feature's geometry and populate your combobox
using DOM. I made something similar in the past (1). The only
exception is that I found the getFeature resquest a bit heavy, so I made
a small mapscript script that would only return the name + geom of
features I needed. I made it the same format as OpenLayers.Format.Text
(see what getCities.php returns in firebug).
Or, you could also take a look at the Shortcuts and Recenter examples
of MapFish (2) (if you're thinking of using ExtJS in your application).
Shortcuts works "client-side" only and you need to manually set your
data (like above). Recenter uses a server-side application to do the
queries (mapfish-server).
Regards,
(1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html (click the 'house'
button, code is in bdga.js)
(2) http://demo.mapfish.org/mapfishsample/trunk/
Surya Tarigan wrote:
> dear list,
>
> I have wms layer with 100 different river names. I am looking script
> example, where i can click certain river name from dropdown list and
> the cursor fly to the specified river.
>
> best regards,
>
> surya
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From ahocevar at opengeo.org Mon Aug 10 08:43:04 2009
From: ahocevar at opengeo.org (Andreas Hocevar)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Modifying existing feature selecting it by
code and then modify and save
In-Reply-To: <4A7FF1B3.80402@gmail.com>
References: <4A7FF1B3.80402@gmail.com>
Message-ID: <4A8015D8.8030805@opengeo.org>
Jani Tiainen wrote:
> I'm trying to achieve "select by code" and "start modify" functionality
> to my OL webapp.
>
You may want to have a look at the new standalone option of the
ModifyFeature control (in OpenLayers trunk). If set to true, you can just do
modifyControl.selectFeature(yourFeature);
and you can start editing the feature.
Regards,
Andreas.
> I've form that user selects on feature to be editable, clicks "edit" and
> then OL vector layer should be in "edit mode". When done editing changes
> are just saved with simply clicking "save" button on a same form.
>
> I haven't been succesful with modifying existing tools. It seems that
> they require always that feature is selected from vector layer (with
> mouse) before any modification happen and then modification ends by
> clicking outside of element.
>
> Is there simple way to achieve something I'm looking for or do I need to
> develop set of own tools to get wanted functionality?
>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
From emckenna at phase2technology.com Mon Aug 10 10:03:45 2009
From: emckenna at phase2technology.com (emackn)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] centerLayerContainer is setting pixel center
to 0, 0
In-Reply-To: <14007067.1491249689731847.JavaMail.eric@emacbook.local>
References: <14007067.1491249689731847.JavaMail.eric@emacbook.local>
Message-ID: <1249913025243-3417347.post@n2.nabble.com>
Still drawing a blank on this. Nothing new to report really. Tried setting
the map size on creation but that didnt' work. Also looked into some
setTimeout function tricks but none of those worked out either. Wondering
if the AJAX call is screwing me.
--
View this message in context: http://n2.nabble.com/centerLayerContainer-is-setting-pixel-center-to-0%2C-0-tp3407397p3417347.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From taviroquai at gmail.com Mon Aug 10 11:17:56 2009
From: taviroquai at gmail.com (taviroquai)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Vectors layer over Google
In-Reply-To: <1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com>
References: <1249569132508-3398605.post@n2.nabble.com>
<1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com>
Message-ID: <1249917476091-3417803.post@n2.nabble.com>
Hi,
Thanks for your hint. The problem was with the kml file... now its working.
Cheers,
Marco
--
View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3417803.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From eric.lemoine at camptocamp.com Tue Aug 11 00:37:46 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Bug in Google with overaly example
In-Reply-To: <1249684505845-3407076.post@n2.nabble.com>
References: <1249684505845-3407076.post@n2.nabble.com>
Message-ID:
On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo Moreno wrote:
>
> Hi all,
> The google with overlay example from "http://openlayers.org/dev/examples/"
> is working incorrectly. The bug is not only because the worldmap is not
> loaded correctly but also because this is covering whole the map and thus
> the google layer is not showed, just the worldmap is showed. if you turn off
> the worldmap layer then it's possible to view the google layer. I realized
> about it because I have a similar example overlaping google maps with
> mapguide layers and 3 months ago this sample worked appropriately (in that
> moment the last release was 2.6 version) and now I got the same bug, it
> means that mapguide layers covers whole map that don't enable to view the
> google layers.
The layer you put on top of the google layer must be transparent. If
your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true
in the layer params.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From milan.antonovic at gmail.com Tue Aug 11 05:56:33 2009
From: milan.antonovic at gmail.com (Milan Antonovic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it
possible?)
Message-ID:
Hi list,
I would like some explanation about StyleMap with labels, before OL 2.8 I
used to create popups with transparent background to create labels.
But now I tried to use the new StyleMap - label option.
During my tests I understand that I cannot do somthing like this:
label : "
${value}
${name}",
Is there an other way to format labels with html tags using the label
option?
My best regards
Milan
--
M. Antonovic
Software Engineer
Institute of Earth Sciences - SUPSI
- http://www.ist.supsi.ch/
Division of Geomatics
- http://istgeo.ist.supsi.ch/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/652e96a1/attachment.html
From ahocevar at opengeo.org Tue Aug 11 09:17:31 2009
From: ahocevar at opengeo.org (Andreas Hocevar)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it
possible?)
In-Reply-To:
References:
Message-ID: <4A816F6B.7060606@opengeo.org>
Hi,
Milan Antonovic wrote:
> I would like some explanation about StyleMap with labels, before OL
> 2.8 I used to create popups with transparent background to create labels.
> But now I tried to use the new StyleMap - label option.
>
> During my tests I understand that I cannot do somthing like this:
>
> label : "
${value}
${name}",
>
> Is there an other way to format labels with html tags using the label
> option?
Unfortunately not. The labels are rendered using SVG/VML/Canvas, and you
cannot provide markup for the label text.
Regards,
Andreas.
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
From milan.antonovic at gmail.com Tue Aug 11 10:00:31 2009
From: milan.antonovic at gmail.com (Milan Antonovic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it
possible?)
In-Reply-To: <4A816F6B.7060606@opengeo.org>
References:
<4A816F6B.7060606@opengeo.org>
Message-ID:
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 100 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/4eba47e7/attachment.gif
From growe at lancova.com Tue Aug 11 11:12:06 2009
From: growe at lancova.com (Glenn Rowe)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Trying to query a database with attribute
obtained from a mouse click
Message-ID: <4A818A46.7010502@lancova.com>
I'm looking for the simplest possible solution to a problem I'm having
with a mapping project. I'm still struggling to figure out OpenLayers,
so bear with me.
I have a map with 3 base layers and 2 transparent overlays, all
generated from shapefiles that are produced and maintained in-house.
This project is for a county government web site and the layers depict
roads, parcels, town boundaries and such. I've been able to display the
map on a web page using either OpenLayers.Layer.MapServer or
OpenLayers.Layer.WMS (through the mapserv cgi). I can zoom in, zoom out,
pan and I can switch layers on and off.
In order to make this project functional for the intended end users, I
need to be able to "grab" the value of a single attribute of the parcels
layer by clicking on a particular parcel polygon, send that value to a
MySQL database query to obtain additional parcel data and then return
the results to another area of the web page.
The parcels layer is one of the transparent overlays if that makes any
difference.
I've already got a database query that works by entering an owner name
or parcel ID number into an HTML form, but I need to be able to get a
parcel ID number from the map into the database query by clicking on the
map. Like I said before, I'm looking for the simplest approach possible.
Any help would be appreciated.
--
Glenn D. Rowe
Director of General Services
Lancaster County, Virginia
From michael.ocleirigh at rivulet.ca Tue Aug 11 12:01:37 2009
From: michael.ocleirigh at rivulet.ca (Michael O'Cleirigh)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Is there any way to avoid loading spatial data
when using OpenLayers.Control.GetFeature?
Message-ID: <4A8195E1.3030402@rivulet.ca>
Hello,
I have a WMS layer containing various polygons that are used to
subdivide a map. The boundaries run along the street center line and
rivers, etc. It is a transparent layer sitting on top of google maps.
When the user clicks on the map I want to use WFS to get the zone number
of the polygon that contains the clicked point.
But the problem is that I don't need the geographic detail of the zone.
I add the zone number into the WMS layer logical filter which toggles
the polygon visibility.
Because the performance is slow I want to avoid fetching the spatial
data as part of the WFS request.
In the browser I can add a 'propertyName' parameter and this will
constrain the attributes returned to only include the zone number (i.e.
to exclude the spatial column). But I can't figure out how to do this
to a OpenLayers.Protocol.WFS object.
Does anyone have an example of how I can do this? or do I need to craft
a custom OpenLayers.Request call?
Thanks for your help,
Mike
References:
The control is registered as:
control = new OpenLayers.Control.GetFeature( {
protocol : OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer),
box : false,
hover : false,
multiple : false,
click : true,
clickout : false,
toggle : false,
clickTolerance : 0,
maxFeatures : 5
});
My click hander is:
control.events.register("featureselected", this, function(e) {
// get the zone number from the feature attributes returned
through WFS
var selectedZone = e.feature.attributes[this.zoneFilterName];
if (this.containsZone(selectedZone) == 1) {
// this is a remove
this.removeZoneFromFilter(selectedZone);
} else {
// this is an add
this.addZoneToFilter(selectedZone);
}
// update the filters on this.wmsLayer
this.update();
});
In Browser WFS request:
If I run the WFS GET query in the browser I can add a propertyName
parameter that will cause only that named value to be returned
http://10.0.16.100:8081/geoserver/wfs?request=GetFeature&service=WFS&version=1.1.0&typeName=zone_boundary&srs=urn:x-ogc:def:crs:EPSG:900913&maxfeatures=1&propertyName=zoneNumber
Response:
1
From jay.douillard at ubc.ca Tue Aug 11 14:26:34 2009
From: jay.douillard at ubc.ca (Jay Douillard)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Trying to query a database with attribute
obtained from a mouse click
In-Reply-To: <5843666.359631250015164909.JavaMail.root@verrazzano>
Message-ID: <17084672.359651250015194212.JavaMail.root@verrazzano>
Glenn,
This should get you started: http://trac.openlayers.org/wiki/GetFeatureInfo
Jay
----- Original Message -----
From: "Glenn Rowe"
To: users@openlayers.org
Sent: Tuesday, August 11, 2009 8:12:06 AM GMT -08:00 US/Canada Pacific
Subject: [OpenLayers-Users] Trying to query a database with attribute obtained from a mouse click
I'm looking for the simplest possible solution to a problem I'm having
with a mapping project. I'm still struggling to figure out OpenLayers,
so bear with me.
I have a map with 3 base layers and 2 transparent overlays, all
generated from shapefiles that are produced and maintained in-house.
This project is for a county government web site and the layers depict
roads, parcels, town boundaries and such. I've been able to display the
map on a web page using either OpenLayers.Layer.MapServer or
OpenLayers.Layer.WMS (through the mapserv cgi). I can zoom in, zoom out,
pan and I can switch layers on and off.
In order to make this project functional for the intended end users, I
need to be able to "grab" the value of a single attribute of the parcels
layer by clicking on a particular parcel polygon, send that value to a
MySQL database query to obtain additional parcel data and then return
the results to another area of the web page.
The parcels layer is one of the transparent overlays if that makes any
difference.
I've already got a database query that works by entering an owner name
or parcel ID number into an HTML form, but I need to be able to get a
parcel ID number from the map into the database query by clicking on the
map. Like I said before, I'm looking for the simplest approach possible.
Any help would be appreciated.
--
Glenn D. Rowe
Director of General Services
Lancaster County, Virginia
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users
From rodolfoamoreno at gmail.com Tue Aug 11 15:33:29 2009
From: rodolfoamoreno at gmail.com (Rodolfo Moreno)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Bug in Google with overaly example
In-Reply-To:
References: <1249684505845-3407076.post@n2.nabble.com>
Message-ID: <1250019209158-3426344.post@n2.nabble.com>
Thanks Eric for your answer. I am overlapping a mapguide layer. I did what
you suggested but it's not working.
var dynamicOverlayOptions = {
buffer: 1,
singleTile: true,
isBaseLayer : false,
visibility : true,
transparent:true // This is the code added
};
Is this property (transparent:true) new?
I ask about it because my sample works fine 3 months ago.
Thanks in advance
Eric Lemoine-2-2 wrote:
>
> On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo Moreno
> wrote:
>>
>> Hi all,
>> The google with overlay example from
>> "http://openlayers.org/dev/examples/"
>> is working incorrectly. The bug is not only because the worldmap is not
>> loaded correctly but also because this is covering whole the map and thus
>> the google layer is not showed, just the worldmap is showed. if you turn
>> off
>> the worldmap layer then it's possible to view the google layer. I
>> realized
>> about it because I have a similar example overlaping google maps with
>> mapguide layers and 3 months ago this sample worked appropriately (in
>> that
>> moment the last release was 2.6 version) and now I got the same bug, it
>> means that mapguide layers covers whole map that don't enable to view the
>> google layers.
>
> The layer you put on top of the google layer must be transparent. If
> your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true
> in the layer params.
>
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-----
Rodolfo Moreno
CivilEng
--
View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From mak.kolybabi at telenium.ca Tue Aug 11 16:37:21 2009
From: mak.kolybabi at telenium.ca (Mak Kolybabi)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Fetching tiles from different sources based on
zoom level
Message-ID: <20090811203721.GA11398@throckmorton>
For my current application, I need to simplify roads as much as possible. PostGIS provides
the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the
closer I zoom into the layer, the simplifications that were fine when zoomed further out
gradually become unacceptable.
Is there a way to make OpenLayers query a different (TMS) source based on the zoom level?
If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each
zoom level.
--
Mak Kolybabi
Programmer
Telenium Inc.
204-957-2821
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/960ffd69/attachment.bin
From crschmidt at metacarta.com Tue Aug 11 16:49:23 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Fetching tiles from different sources
based on zoom level
In-Reply-To: <20090811203721.GA11398@throckmorton>
References: <20090811203721.GA11398@throckmorton>
Message-ID: <20090811204922.GB31194@metacarta.com>
On Tue, Aug 11, 2009 at 03:37:21PM -0500, Mak Kolybabi wrote:
> For my current application, I need to simplify roads as much as possible. PostGIS provides
> the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the
> closer I zoom into the layer, the simplifications that were fine when zoomed further out
> gradually become unacceptable.
>
> Is there a way to make OpenLayers query a different (TMS) source based on the zoom level?
> If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each
> zoom level.
Why not use scale-dependant rendering on the backend to select a different
datasource/layer when zoomed in vs. zoomed out?
Regards,
--
Christopher Schmidt
MetaCarta
From Gerhard.Duennebeil at chello.at Wed Aug 12 01:44:38 2009
From: Gerhard.Duennebeil at chello.at (=?ISO-8859-1?Q?Gerhard_D=FCnnebeil?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Problems with IE8 and GeoJSON
Message-ID: <4A8256C6.7040804@chello.at>
Hi everybody.
Not sure this problem already got discussed, if yes.....please give me a
pointer to it. Otherwise .....
I try to display a vector layer using a fixed strategy and GeoJSON.
Things work fine under Firefox.
When I test things with IE8, things fail. I run IE8 in default mode, no
special headers or anything set on the web page that holds the map or
elsewhere.
I digged deeper into it and found the following strange behaviour:
When the Layer is about to be drawn, data is fetched from the net and
converted from JSON to java script. This happens in the read method
(GEOjson.js/Line 64, see code excerpt below)
A bit below (line 69) the conversion is done into the variable "obj".
When you look at the "obj" variable at this point it holds an array
named features *but* the feature array has *no* length property.
Otherwise the array is correct with respect to the input data.
In line 108 this feature array is iterated with a reference to the
length property. When IE8 interprets this statement the feature array
suddenly *has* a length property but it is wrong (too big, 3 instead of 2).
As a follow-up error this causes the loop to break via the catch block
when features[2] is accessed and gives back an empty result instead of
the expected.
Is this a known problem?
How to work around it?
thanks for any help and
best regards
Gerhard
------------------------------------------
Appendix 1, the code mentioned above)
read: function(json, type, filter) {
type = (type) ? type : "FeatureCollection";
var results = null;
var obj = null;
if (typeof json == "string") {
line 69: obj = OpenLayers.Format.JSON.prototype.read.apply(this,
[json,
filter]);
} else {
obj = json;
}
if(!obj) {
OpenLayers.Console.error("Bad JSON: " + json);
} else if(typeof(obj.type) != "string") {
OpenLayers.Console.error("Bad GeoJSON - no type: " + json);
} else if(this.isValidType(obj, type)) {
switch(type) {
case "Geometry":
try {
results = this.parseGeometry(obj);
} catch(err) {
OpenLayers.Console.error(err);
}
break;
case "Feature":
try {
results = this.parseFeature(obj);
results.type = "Feature";
} catch(err) {
OpenLayers.Console.error(err);
}
break;
case "FeatureCollection":
// for type FeatureCollection, we allow input to be
any type
results = [];
switch(obj.type) {
case "Feature":
try {
results.push(this.parseFeature(obj));
} catch(err) {
results = null;
OpenLayers.Console.error(err);
}
break;
case "FeatureCollection":
line 108: for(var i=0,
len=obj.features.length; i
References: <4A8195E1.3030402@rivulet.ca>
Message-ID:
On Tue, Aug 11, 2009 at 6:01 PM, Michael
O'Cleirigh wrote:
> Hello,
>
> I have a WMS layer containing various polygons that are used to
> subdivide a map. ?The boundaries run along the street center line and
> rivers, etc. It is a transparent layer sitting on top of google maps.
>
> When the user clicks on the map I want to use WFS to get the zone number
> of the polygon that contains the clicked point.
>
> But the problem is that I don't need the geographic detail of the zone.
> I add the zone number into the WMS layer logical filter which toggles
> the polygon visibility.
>
> Because the performance is slow I want to avoid fetching the spatial
> data as part of the WFS request.
>
> In the browser I can add a 'propertyName' parameter and this will
> constrain the attributes returned to only include the zone number (i.e.
> to exclude the spatial column). ?But I can't figure out how to do this
> to a OpenLayers.Protocol.WFS object.
>
> Does anyone have an example of how I can do this? or do I need to craft
> a custom OpenLayers.Request call?
>
> Thanks for your help,
>
> Mike
>
> References:
>
> The control is registered as:
>
> control = new OpenLayers.Control.GetFeature( {
> ? ? ? ?protocol : OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer),
You can try
OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer, {
formatOptions: {
propertyNames: ["name1", "name2"]
}
})
I haven't tested it myself but that may work.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From francois.vanderbiest at camptocamp.com Wed Aug 12 02:43:34 2009
From: francois.vanderbiest at camptocamp.com (=?ISO-8859-1?Q?Fran=E7ois_Van_Der_Biest?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Is there any way to avoid loading spatial
data when using OpenLayers.Control.GetFeature?
In-Reply-To: <4A8195E1.3030402@rivulet.ca>
References: <4A8195E1.3030402@rivulet.ca>
Message-ID:
Why not just use a WMS GetFeatureInfo request for that purpose ?
You should be able to get only the attributes, and no geometry in the response.
Cheers,
F.
On Tue, Aug 11, 2009 at 6:01 PM, Michael
O'Cleirigh wrote:
> Hello,
>
> I have a WMS layer containing various polygons that are used to
> subdivide a map. ?The boundaries run along the street center line and
> rivers, etc. It is a transparent layer sitting on top of google maps.
>
> When the user clicks on the map I want to use WFS to get the zone number
> of the polygon that contains the clicked point.
>
> But the problem is that I don't need the geographic detail of the zone.
> I add the zone number into the WMS layer logical filter which toggles
> the polygon visibility.
>
> Because the performance is slow I want to avoid fetching the spatial
> data as part of the WFS request.
>
> In the browser I can add a 'propertyName' parameter and this will
> constrain the attributes returned to only include the zone number (i.e.
> to exclude the spatial column). ?But I can't figure out how to do this
> to a OpenLayers.Protocol.WFS object.
>
> Does anyone have an example of how I can do this? or do I need to craft
> a custom OpenLayers.Request call?
>
> Thanks for your help,
>
> Mike
>
From igrcic at gmail.com Wed Aug 12 03:42:05 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Fetching tiles from different sources based
on zoom level
In-Reply-To: <20090811204922.GB31194@metacarta.com>
References: <20090811203721.GA11398@throckmorton>
<20090811204922.GB31194@metacarta.com>
Message-ID:
hi, maybe this could help:
http://n2.nabble.com/A-kind-of-MultiLayer-container-td3379027.html#a3379027
and for vectors:
http://openlayers.org/pipermail/users/2009-January/009666.html
On Tue, Aug 11, 2009 at 10:49 PM, Christopher
Schmidt wrote:
> On Tue, Aug 11, 2009 at 03:37:21PM -0500, Mak Kolybabi wrote:
>> For my current application, I need to simplify roads as much as possible. PostGIS provides
>> the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the
>> closer I zoom into the layer, the simplifications that were fine when zoomed further out
>> gradually become unacceptable.
>>
>> Is there a way to make OpenLayers query a different (TMS) source based on the zoom level?
>> If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each
>> zoom level.
>
> Why not use scale-dependant rendering on the backend to select a different
> datasource/layer when zoomed in vs. zoomed out?
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From max.weidemann at freenet.de Wed Aug 12 07:18:35 2009
From: max.weidemann at freenet.de (Max Weidemann)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] OpenLayers site it's down? 2009-08-12
Message-ID: <1250075915138-3430054.post@n2.nabble.com>
Hi everybody
I tried loading the openlayers.org sites for nearly 6 hours but the sites
are not found.
Is there a problem with the server??
Has anyone an information when the sites are on again??
Thanks
Max
--
View this message in context: http://n2.nabble.com/OpenLayers-site-it%27s-down--2009-08-12-tp3430054p3430054.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From patzke at geoinformationsdienst.de Wed Aug 12 08:04:50 2009
From: patzke at geoinformationsdienst.de (Fabian Patzke)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Switching projection on loaded map
In-Reply-To:
References:
Message-ID: <1250078690214-3430249.post@n2.nabble.com>
If anyone is interested how I solved my problem, see below.
Fabian Patzke wrote:
>
> I want to build an option in my OL map app so that a user can switch the
> used
> projection of the map to another.
> For example my map is in EPSG:4326. Than I add some layers to the map and
> the
> user can use the map. If one want it should be possible to switch to
> EPSG:32632
> via a button and the map should be reloaded with the new projection.
>
> My problem is, that it is not possible to set the map.projection once a
> layer
> has been added. I've tried it and it can only be set with
> map.setOptions(...) as
> long no layer has been loaded.
>
> Is there an easy way to reload/redraw/recreate the map or do I have to
> destroy
> the map an build it up with a new projection by hand?
>
I took all necessary information out of the map
map.getProjection();
map.getCenter().lon;
map.getCenter().lat;
map.getZoom();
Destroy the map an then restart it with the transform parameters an new
Projection, new units, and a new resolutionsArray.
No big deal but not everything is solved out of the box with this solution.
For example when you want to have the same layers visible as before the
switch. We do it with saving our visibility and such stuff in a database. I
think for a small map with only a few layers you could simply make another
array an save there state inside.
--
View this message in context: http://n2.nabble.com/Switching-projection-on-loaded-map-tp3011928p3430249.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From tobias.wendorff at uni-dortmund.de Wed Aug 12 10:12:20 2009
From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] openlayers.org down => maps down
Message-ID: <4A82CDC4.5040508@uni-dortmund.de>
Hi there,
openlayers.org seems to be unreachable (down or DoS attact?).
The result is that all maps, which are "hardcoded" to openlayers.js
on openlayers.org don't work anymore.
Nice :-)
Best regards,
Tobias
From kgalligan at gmail.com Wed Aug 12 10:10:04 2009
From: kgalligan at gmail.com (Kevin Galligan)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] openlayers.org down => maps down
In-Reply-To: <4A82CDC4.5040508@uni-dortmund.de>
References: <4A82CDC4.5040508@uni-dortmund.de>
Message-ID:
Since the js is a static file, I'd suggest the obvious. Host it on
your own site. Less dependencies is good.
On Wed, Aug 12, 2009 at 10:12 AM, Tobias
Wendorff wrote:
> Hi there,
>
> openlayers.org seems to be unreachable (down or DoS attact?).
>
> The result is that all maps, which are "hardcoded" to openlayers.js
> on openlayers.org don't work anymore.
>
> Nice :-)
>
> Best regards,
> Tobias
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
--------------------
Kevin Galligan
www.kagii.com
From igrcic at gmail.com Wed Aug 12 10:10:27 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] openlayers.org down => maps down
In-Reply-To: <4A82CDC4.5040508@uni-dortmund.de>
References: <4A82CDC4.5040508@uni-dortmund.de>
Message-ID:
On Wed, Aug 12, 2009 at 4:12 PM, Tobias
Wendorff wrote:
> Hi there,
>
> openlayers.org seems to be unreachable (down or DoS attact?).
>
> The result is that all maps, which are "hardcoded" to openlayers.js
> on openlayers.org don't work anymore.
>
> Nice :-)
Hi, ther's no need for these kind of comments, im sure guys will solve
the problem as soon as they can.
Cheers
>
> Best regards,
> Tobias
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Ivan Grcic
From patzke at geoinformationsdienst.de Wed Aug 12 11:31:19 2009
From: patzke at geoinformationsdienst.de (Fabian Patzke)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Switch from one SLD to another
In-Reply-To: <1250006293575-3424781.post@n2.nabble.com>
References: <1250006293575-3424781.post@n2.nabble.com>
Message-ID: <1250091079270-3431558.post@n2.nabble.com>
TJMartin wrote:
>
> I have a shapefile loaded into GeoServer with 2 different SLDs to style
> the data differently depending a customer requirement.
> In OpenLayers i call the WMS with the various options (extents,projection
> etc)
> My map works but only with the SLD i attach to the data in geoserver. What
> i want is a button on the client side to switch to the second SLD.
> My openlayers code looks like this
>
> [...]
>
> and the two SLDs are
>
> simple.sld
> newstyle.sld
>
You can merge a sld parameter to the layer with
layer.mergeNewParams({SLD: sldURL});
i.e.: layer.mergeNewParams({SLD: "http://localhost/SLD/simple.sld"});
sldURL should be the URL of your desired SLD. So the SLD must be reachable
for your geoserver via that URL.
Maybe this helps you a bit.
Greetings,
Fabian
--
View this message in context: http://n2.nabble.com/Switch-from-one-SLD-to-another-tp3424781p3431558.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From crschmidt at metacarta.com Wed Aug 12 12:00:43 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] OpenLayers site it's down? 2009-08-12
In-Reply-To: <1250075915138-3430054.post@n2.nabble.com>
References: <1250075915138-3430054.post@n2.nabble.com>
Message-ID: <20090812160041.GE31194@metacarta.com>
On Wed, Aug 12, 2009 at 06:18:35AM -0500, Max Weidemann wrote:
>
> Hi everybody
>
> I tried loading the openlayers.org sites for nearly 6 hours but the sites
> are not found.
> Is there a problem with the server??
Sort of.
> Has anyone an information when the sites are on again??
Now. :)
Regards,
--
Christopher Schmidt
MetaCarta
From crschmidt at metacarta.com Wed Aug 12 12:01:44 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] openlayers.org down => maps down
In-Reply-To:
References: <4A82CDC4.5040508@uni-dortmund.de>
Message-ID: <20090812160143.GF31194@metacarta.com>
On Wed, Aug 12, 2009 at 10:10:04AM -0400, Kevin Galligan wrote:
> Since the js is a static file, I'd suggest the obvious. Host it on
> your own site. Less dependencies is good.
Agreed. Host your own OL.js: First, you can build the one you need (saves
bandwidth and time for your users), and second, you don't depend
on me being around :)
-- Chris
> On Wed, Aug 12, 2009 at 10:12 AM, Tobias
> Wendorff wrote:
> > Hi there,
> >
> > openlayers.org seems to be unreachable (down or DoS attact?).
> >
> > The result is that all maps, which are "hardcoded" to openlayers.js
> > on openlayers.org don't work anymore.
> >
> > Nice :-)
> >
> > Best regards,
> > Tobias
> > _______________________________________________
> > Users mailing list
> > Users@openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
>
>
>
> --
> --------------------
> Kevin Galligan
> www.kagii.com
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Christopher Schmidt
MetaCarta
From Aaron_Gundel at sjwater.com Wed Aug 12 18:57:23 2009
From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
Message-ID:
Hello,
I am fairly new to the vector layers within openlayers and I had a
question about their usage. I'm trying to use the gml layer to display
data from a wfs. (If you're wondering why I'm not using the wfs layer,
it's because I couldn't find a method to change the wfs url and reload the
layer in the wfs layer -- whereas such a method exists within the gml
layer, seturl). It's not working. I'm using geoserver for the wfs and
getting a single feature which I want to display in the gml layer. I
don't know if this is just some inherent incompatibility or if I'm not
styling the gml layer properly (I've been experimenting with points that
are being retrieved through the wfs.)
var style = new OpenLayers.Style();
var rule = new OpenLayers.Rule(
{
symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5,
strokeColor: "black"}
});
style.addRules([rule]);
var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs",
{styleMap:new OpenLayers.StyleMap(style)});
return gmlLayer;
Anyway, I've confirmed that my wfs call is definitely returning gml -- I
just can't get it to display. Can anyone help me out here?
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090812/8b694413/attachment.html
From crschmidt at metacarta.com Wed Aug 12 21:46:08 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To:
References:
Message-ID: <20090813014608.GH31194@metacarta.com>
On Wed, Aug 12, 2009 at 03:57:23PM -0700, Aaron_Gundel@sjwater.com wrote:
> Hello,
>
> I am fairly new to the vector layers within openlayers and I had a
> question about their usage. I'm trying to use the gml layer to display
> data from a wfs. (If you're wondering why I'm not using the wfs layer,
> it's because I couldn't find a method to change the wfs url and reload the
> layer in the wfs layer -- whereas such a method exists within the gml
> layer, seturl). It's not working. I'm using geoserver for the wfs and
> getting a single feature which I want to display in the gml layer. I
> don't know if this is just some inherent incompatibility or if I'm not
> styling the gml layer properly (I've been experimenting with points that
> are being retrieved through the wfs.)
>
> var style = new OpenLayers.Style();
> var rule = new OpenLayers.Rule(
> {
> symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5,
> strokeColor: "black"}
> });
> style.addRules([rule]);
> var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs",
> {styleMap:new OpenLayers.StyleMap(style)});
> return gmlLayer;
>
> Anyway, I've confirmed that my wfs call is definitely returning gml -- I
> just can't get it to display. Can anyone help me out here?
is your HTML page hosted at http://mywfscall/htmlpage.html? That is, does it
share the same origin -- protocol (http), domain (mywfscall), port (80)?
If not, then you are violating the same origin policy, and need to set up
a proxy:
http://faq.openlayers.org/proxyhost/all/
Regards,
--
Christopher Schmidt
MetaCarta
From azxc_0000 at yahoo.com.cn Wed Aug 12 21:58:34 2009
From: azxc_0000 at yahoo.com.cn (=?utf-8?B?6I656I65IOadjg==?=)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] about Navigation and Box Control
Message-ID: <133009.25562.qm@web15104.mail.cnb.yahoo.com>
Hi:
????? I have a problem,i can't use Navigation Control(OpenLayers.Control.Navigation()) when i have used Box Control like this :
??? var control = new OpenLayers.Control();
??????????????? OpenLayers.Util.extend(control, {
??????????????????? draw: function () {
??????????????????????? // this Handler.Box will intercept the shift-mousedown
??????????????????????? // before Control.MouseDefault gets to see it
??????????????????????? this.box = new OpenLayers.Handler.Box( control,
??????????????????????????? {"done": this.notice},
??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL});
??????????????????????? this.box.activate();
??????????????????? },
??????????????????? notice: function (bounds) {
??????????????????????? var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom));
??????????????????????? var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top));
??????????????????????? var rowlength = document.all("table1").rows.length;
??????????????????????? for(var i=1; ill.lon.toFixed(4)&&xll.lat.toFixed(4)&&y
References:
Message-ID: <1250147462778-3435995.post@n2.nabble.com>
I made progress and it works now for me, but I stumbled over some weird
behaviour further posting is an dev-list see:
http://n2.nabble.com/Adding-Feature-to-WFS-in-Vector-Layer---Copying-Features-tp3416461p3435981.html
Fabian Patzke wrote:
>
> I moved a bit further with my efforts.
> My transaction is getting more and more
> complete. But the Coordinates are still missing.
> If anybody has an idea it would be great ;)
>
> xmlns:wfs="http://www.opengis.net/wfs"
> service="WFS"
> version="1.0.0"
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
> http://www.FOO.BLA
> http://FOO:8080/geoserver/wfs?Service=WFS&Request=DescribeFeatureType&
> version=1.0.0&typename=foo:bla"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
> xmlns:feature="http://FOO.BLA">
>
> xmlns:gml="http://www.opengis.net/gml"
> srsName="EPSG:31467"/>
>
>
>
>
>
> Before I try to commit a newly added feature I print out FID an geometry
> of the
> last features of the layer I added to.
> As you can see below, I get the last
> feature that has been in the layer before the add (FID: bla.203) and the
> newly
> added (FID: null).
> So I do not get the reason why no geometry is in the transaction.
>
> FID: bla.203 #202: MULTIPOLYGON(((3440276.57 5791250.12,3440243.1
> 5791360.32,3440244.73 5791414.19,3440263.51 5791485.21,3440359.01
> 5791523.57,3440515.73 5791495.82,3440598.82 5791494.96,3440609.43
> 5791557.01,3440700.07 5791522.72,3440704.15 5791588.86,3440841.91
> 5791548.07,3440823.94 5791481.1,3440917.87 5791429.64,3440917.87
> 5791415.75,3440753.7 5791349.59,3440813.05 5791255.64,3440910.28
> 5791228.67,3440902.11 5791175.56,3440840.83 5791161.67,3440837.56
> 5791179.65,3440797.52 5791174.75,3440737.06 5791121.64,3440659.11
> 5791106.1,3440650.94 5791142.88,3440556.13 5791270.38,3440455.76
> 5791170.57,3440434.5 5791204.92,3440467.21 5791245.82,3440447.58
> 5791284.26,3440392.79 5791288.35,3440289.74 5791259.72,
> 3440276.57 5791250.12)))
> FID: null #203: MULTIPOLYGON(((3302091.4993788 5913241.9002485,
> 3287274.8407132 5864558.5932041,3334547.0374084 5856797.486284,
> 3360652.578867 5906891.9036775,3302091.4993788 5913241.9002485)))
>
> Any help would be nice.
>
> Greetings,
> Fabian
>
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Adding-Feature-to-WFS-in-Vector-Layer---Copying-Features-tp3390769p3435995.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From surya.tarigan at yahoo.com Thu Aug 13 04:21:07 2009
From: surya.tarigan at yahoo.com (Surya Tarigan)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Automatic zooming to map points based on
elements selected from drop-down lists
Message-ID: <965178.82034.qm@web111919.mail.gq1.yahoo.com>
Dear list,
?
would somebody give hints or share javascript codes on how to automatically zooming to map points based on elements selected from drop-down lists.?
?
best regards,
?
surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/e9c72351/attachment.html
From thomas at buschhardt.de Thu Aug 13 05:50:22 2009
From: thomas at buschhardt.de (Thomas Buschhardt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Using OpenLayers with a non WMS-Service
Message-ID: <5FBFFE22-D24E-4F47-AA6E-C4ED05313702@buschhardt.de>
Hallo,
I want connect OpenLayers with a non WMS-map programm. I wrote a
little php-Script as a bridge to this map-programm and Im able to
request.
I can zoom-in and pan in this map but Im unable to zoom-out. I think I
dont understand the logic of the boundig-box of OpenLayers.
I add a Image-Layer to OpenLayers and register an zoom/move-Event to
this map to request the new coordinates.
If the script get the event - it throws the function showmap (its al
little bit Ajax) and I send this new coordinates to the map-server and
get a array with picture-url and bbox-coordinates back. My problem is
the understanding of
layerExt and why I cant zoom-out.
Thank You for help me out.
Thomas
Here is the code:
function init(){
map = new OpenLayers.Map('map',{controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoom(),
new OpenLayers.Control.MousePosition()
] });
//GIS-Karte Layer init - without picture
var layerExt=new OpenLayers.Bounds(10.0,10.0,1000.0,1000.0);
var layerSize=new OpenLayers.Size(500,500);
layer=new OpenLayers.Layer.Image("GISDienstLayer","no-
pic.jpg",layerExt,layerSize);
map.addLayer(layer);
map.events.register("moveend", this, function() {
if (!noaction){
boundobj=this.map.getExtent();
bbox=boundobj.toArray();
lux=bbox[0];
luy=bbox[1];
rox=bbox[2];
roy=bbox[3];
noaction=true;
showmap();
}
}
);
}
function showmap(){
var anfrage=getXMLObject();
anfrage.open("POST","gismap.php",true);
anfrage.onreadystatechange=function(){
if (anfrage.readyState==4){
if (anfrage.status==200){
var antwort=anfrage.responseText;
pgAntwort=antwort.split("\t");
//destroy old layer
map.removeLayer(layer);
//Extent BBox of the actual Picture
picurl=pgAntwort[0];
lux = parseFloat(pgAntwort[2]);
luy = parseFloat(pgAntwort[3]);
rox = parseFloat(pgAntwort[4]);
roy = parseFloat(pgAntwort[5]);
//maybe here is the problem
var layerExt=new
OpenLayers.Bounds(pgAntwort[2],pgAntwort[3],pgAntwort[4],pgAntwort[5]);
var layerSize=new OpenLayers.Size(500,500);
layer=new
OpenLayers.Layer.Image("GISDienstLayer",picurl,layerExt,layerSize);
map.addLayer(layer);
//whats that?
map.maxExtent= new OpenLayers.Bounds(4000000,5000000,5000000,6000000);
map.zoomToMaxExtent();
noaction=false;
}
}
}
anfrage.setRequestHeader ("Content-Type", "application/x-www-form-
urlencoded");
anfrage.send("cmd=getmap&lux="+escape(lux)+"&luy="+escape(luy)
+"&rox="+escape(rox)+"&roy="+escape(roy));
}
From rajeev.kumar.sharma at gmail.com Thu Aug 13 06:05:18 2009
From: rajeev.kumar.sharma at gmail.com (RajeevSharma)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Using Openlayers with Tile and Export Image
doesnt "overlap"
Message-ID: <1250157918424-3436851.post@n2.nabble.com>
Hello,
I am using Open Layers for the first time, and would like to display maps
from multiple services.
1. A Tiled map service which forms the background.
2. One or more Dynamic map services which will be used to overlay on top of
the first service.
I am using the XYZ and ArcGIS93Rest respectively to do the same. The maps do
display but their images arent synchronised. Meaning, the tiled layer image
comes up on the top left part of the screen, and the export map from the
Rest service comes up in the centre and larger than the tiled map.
I tried tweaking around with the resolution param which didnt help much. The
maps moved a bit closer until 4000 then they started moving apart. Setting
this to "auto" didnt help either. The SRS is the same for both services. As
are the map initial and final extents.
Can any one please let me know if I am doing something wrong out here?
Thanks,
Rajeev
--
View this message in context: http://n2.nabble.com/Using-Openlayers-with-Tile-and-Export-Image-doesnt-%22overlap%22-tp3436851p3436851.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From manuel.albela at gmail.com Thu Aug 13 06:12:00 2009
From: manuel.albela at gmail.com (Manuel Albela Miranda)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
Message-ID:
Hi everybody!,
I have one GML layer where some of the points are in the same location, so
I'm wondering if it's possible to get all the features that are at that
location when you click on it by using the SelectFeature control or if there
is another way to do that.
Thank you very much in advance.
Manu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/89487cc0/attachment.html
From igrcic at gmail.com Thu Aug 13 06:25:32 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To:
References:
Message-ID:
Hi, cant you use box selection? Or it HAS to be click?
On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela
Miranda wrote:
> Hi everybody!,
>
> I have one GML layer where some of the points are in the same location, so
> I'm wondering if it's possible to get all the features that are at that
> location when you click on it by using the SelectFeature control or if there
> is another way to do that.
>
> Thank you very much in advance.
>
> Manu.
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
Ivan Grcic
From manuel.albela at gmail.com Thu Aug 13 07:15:47 2009
From: manuel.albela at gmail.com (Manuel Albela Miranda)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To:
References:
Message-ID:
Hi Ivan,
I already have it working with the box selection, but for the user it will
be easier to click on a point and get all the different features related to
it. The selection box works perfect for multiple points, but when you need
the precision of one point I think it will be more user friendly to use the
click instead of the box.
Thank you!
Manu
On Thu, Aug 13, 2009 at 12:25 PM, Ivan Grcic wrote:
> Hi, cant you use box selection? Or it HAS to be click?
>
> On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela
> Miranda wrote:
> > Hi everybody!,
> >
> > I have one GML layer where some of the points are in the same location,
> so
> > I'm wondering if it's possible to get all the features that are at that
> > location when you click on it by using the SelectFeature control or if
> there
> > is another way to do that.
> >
> > Thank you very much in advance.
> >
> > Manu.
> >
> > _______________________________________________
> > Users mailing list
> > Users@openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
>
>
> --
> Ivan Grcic
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/f68e5a11/attachment.html
From igrcic at gmail.com Thu Aug 13 07:35:42 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To:
References:
Message-ID:
maybe faking selectBox after feature has been selected?
onSelect : function(feature){
this.selectBox( /* calculate box from feature.geometry */)
}
On Thu, Aug 13, 2009 at 1:15 PM, Manuel Albela
Miranda wrote:
> Hi Ivan,
>
> I already have it working with the box selection, but for the user it will
> be easier to click on a point and get all the different features related to
> it. The selection box works perfect for multiple points, but when you need
> the precision of one point I think it will be more user friendly to use the
> click instead of the box.
>
> Thank you!
>
> Manu
>
> On Thu, Aug 13, 2009 at 12:25 PM, Ivan Grcic wrote:
>>
>> Hi, cant you use box selection? Or it HAS to be click?
>>
>> On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela
>> Miranda wrote:
>> > Hi everybody!,
>> >
>> > I have one GML layer where some of the points are in the same location,
>> > so
>> > I'm wondering if it's possible to get all the features that are at that
>> > location when you click on it by using the SelectFeature control or if
>> > there
>> > is another way to do that.
>> >
>> > Thank you very much in advance.
>> >
>> > Manu.
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users@openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>> >
>>
>>
>>
>> --
>> Ivan Grcic
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
Ivan Grcic
From jerome.freyre at hispeed.ch Thu Aug 13 07:40:32 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Disappearing layers
In-Reply-To: <1250158081909-3436866.post@n2.nabble.com>
References: <1250158081909-3436866.post@n2.nabble.com>
Message-ID: <1250163632706-3437329.post@n2.nabble.com>
Hi Eoinyp,
I watched your code. I think you made a mistake with the zoom level on the
function map.setCenter().
Try to modify the line like that:
map.setCenter(new OpenLayers.LonLat(17, 43), 12);
It should work ;)
Here is the copy of your code that I used and modify:
map = new OpenLayers.Map("map");
map.addControl(new OpenLayers.Control.LayerSwitcher());
//create layer
var velayer = new OpenLayers.Layer.VirtualEarth(
"Roads Layer",
{
'type': VEMapStyle.Road
}
);
var velayer2 = new OpenLayers.Layer.VirtualEarth(
"Aerial Layer",
{
'type': VEMapStyle.Aerial
}
);
map.addLayers([velayer, velayer2]);
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.MousePosition());
map.setCenter(new OpenLayers.LonLat(17, 43), 12);
Sincerly,
J?rome
eoinyp wrote:
>
> Im a newbie, having problem with my map layers. Which ever layer I add
> first is visible when the map loads, but when I try to switch layers they
> both disappear. I seem to be missing something fundamental, though I cant
> figure out what!!
> I am creating the layers and map as follows:
>
> init(){
> create layer 1
> create layer 2
> add([layer1,layer2])
> add[map controls]
> }
>
> The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm
>
> Any help greatly appreciated,
> Thanks,
>
> Eoinyp
>
--
View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From jerome.freyre at hispeed.ch Thu Aug 13 07:43:21 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To:
References:
Message-ID: <1250163801347-3437344.post@n2.nabble.com>
Hi Manuel,
Another way should be the use of the cluster strategy.
If you activate the strategy, all closest points are transform in one
feature called cluster. And the cluster contains points so you can easily
display informations about your points.
http://openlayers.org/dev/examples/strategy-cluster.html
Manuel Albela Miranda wrote:
>
> Hi everybody!,
>
> I have one GML layer where some of the points are in the same location, so
> I'm wondering if it's possible to get all the features that are at that
> location when you click on it by using the SelectFeature control or if
> there
> is another way to do that.
>
> Thank you very much in advance.
>
> Manu.
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From jerome.freyre at hispeed.ch Thu Aug 13 07:49:57 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Automatic zooming to map points based on
elements selected from drop-down lists
In-Reply-To: <965178.82034.qm@web111919.mail.gq1.yahoo.com>
References: <965178.82034.qm@web111919.mail.gq1.yahoo.com>
Message-ID: <1250164197222-3437384.post@n2.nabble.com>
Hi Surya,
If you can recover coordinates of your elements in drop-down list, you can
call the function :
map.setCenter(new OpenLayers.LonLat(selectedElementLongitude,
selectedElementLatitude));
And if there is multiple element selected, you have to create a bounding box
and zoom to the extent:
// Create a bounds
bounds = new OpenLayers.Bounds();
// You can use a loop for for each selected eleement and assign their
lon/lat
bounds.extend(new OpenLayers.LonLat(4,5));
bounds.extend(new OpenLayers.LonLat(5,6));
// Zoom to the extent
map.zoomToExtent(bounds);
Sincerly,
J?rome
Surya Tarigan wrote:
>
> Dear list,
> ?
> would somebody give hints or share javascript codes on how to
> automatically zooming to map points based on elements selected from
> drop-down lists.?
> ?
> best regards,
> ?
> surya
>
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Automatic-zooming-to-map-points-based-on-elements-selected-from-drop-down-lists-tp3436326p3437384.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From rahul_g_teni at yahoo.com Thu Aug 13 08:29:13 2009
From: rahul_g_teni at yahoo.com (Mr. Rahul Teni)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Fw: Projection issue
Message-ID: <965524.94595.qm@web65616.mail.ac4.yahoo.com>
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: india_states.map
Type: application/octet-stream
Size: 492 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/06e2a065/india_states.obj
-------------- next part --------------
var options = { maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), maxResolution: 156543.0339, units: "m", projection: new OpenLayers.Projection("EPSG:900913")};
map = new OpenLayers.Map('map',options);
map.events.on({"moveend": mapEvent});
var options = {
projection: new OpenLayers.Projection("EPSG:900913"),
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
20037508.34, 20037508.34),
TRANSPARENT: 'true',
isBaseLayer:false
};
var gphy = new OpenLayers.Layer.Google(
" Physical",
{'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_PHYSICAL_MAP,numZoomLevels: 18,isBaseLayer: true}
);
var gmap = new OpenLayers.Layer.Google(
"Streets", // the default
{'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),numZoomLevels: 18,isBaseLayer : true}
);
var ghyb = new OpenLayers.Layer.Google(
"Hybrid",
{'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_HYBRID_MAP, numZoomLevels: 18,isBaseLayer: true}
);
var gsat = new OpenLayers.Layer.Google(
"Satellite",
{'sphericalMercator':true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_SATELLITE_MAP, numZoomLevels:18,isBaseLayer:true}
);
map.addLayers([gsat,gphy,gmap,ghyb]);
indianStateBoundary = new OpenLayers.Layer.KaMap( "Indian State Boundary",tilePath,
{ map: "gmap",
g: "__base__",
i:"PNG",
opacity:1,
isBaseLayer:false,
TRANSPARENT:'true'
},
options
);
map.addLayers([indianStateBoundary]);
From crschmidt at metacarta.com Thu Aug 13 08:47:17 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Using Openlayers with Tile and Export
Image doesnt "overlap"
In-Reply-To: <1250157918424-3436851.post@n2.nabble.com>
References: <1250157918424-3436851.post@n2.nabble.com>
Message-ID: <20090813124710.GB14861@metacarta.com>
On Thu, Aug 13, 2009 at 05:05:18AM -0500, RajeevSharma wrote:
>
> Hello,
> I am using Open Layers for the first time, and would like to display maps
> from multiple services.
>
> 1. A Tiled map service which forms the background.
> 2. One or more Dynamic map services which will be used to overlay on top of
> the first service.
>
> I am using the XYZ and ArcGIS93Rest respectively to do the same. The maps do
> display but their images arent synchronised. Meaning, the tiled layer image
> comes up on the top left part of the screen, and the export map from the
> Rest service comes up in the centre and larger than the tiled map.
>
> I tried tweaking around with the resolution param which didnt help much. The
> maps moved a bit closer until 4000 then they started moving apart. Setting
> this to "auto" didnt help either. The SRS is the same for both services. As
> are the map initial and final extents.
>
> Can any one please let me know if I am doing something wrong out here?
the XYZ layer requires you to have correct maxExtent and maxResolution
properties matchingthe grid set up in the tile cache creation configuration.
Without this information, they will not line up. Your Tile Cache metadata
may provide this information, or you may need to consult some othr resource
to find it. Sharing a link to the tiles you are trying to use, as well as
the code you are using to try to use thm, may be helpful.
Best Regards,
--
Christopher Schmidt
MetaCarta
From Kai-Behncke at gmx.de Thu Aug 13 08:52:26 2009
From: Kai-Behncke at gmx.de (Kai Behncke)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Defining WFS-filter dynamically
Message-ID: <20090813125226.28820@gmx.net>
Dear users,
I try to set a WFS-filter dynamically.
I set an array with:
for(var i=0;i 1) {
var filter = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
filters: filter_array
});
} else {
var filter = filter_array[0];
}
filter_body = xml.write(filter_1_0.write(filter));
...but I always get an error:
uncaught exception: Filter writing not supported for rule type: undefined
Has anybody an idea what could be wrong?
Thank you very much, Kai
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From eoinyp at yahoo.com Thu Aug 13 09:52:19 2009
From: eoinyp at yahoo.com (eoinyp)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Disappearing layers
In-Reply-To: <1250163632706-3437329.post@n2.nabble.com>
References: <1250158081909-3436866.post@n2.nabble.com>
<1250163632706-3437329.post@n2.nabble.com>
Message-ID: <1250171539753-3438091.post@n2.nabble.com>
Perfect! :)
Thank you Jerome.
--- On Thu, 13/8/09, Jerome Freyre (via Nabble) wrote:
From: Jerome Freyre (via Nabble)
Subject: Re: [OpenLayers-Users] Disappearing layers
To: "eoinyp"
Date: Thursday, 13 August, 2009, 12:40 PM
Hi Eoinyp,
I watched your code. I think you made a mistake with the zoom level on the function map.setCenter().
Try to modify the line like that:
map.setCenter(new OpenLayers.LonLat(17, 43), 12);
It should work ;)
Here is the copy of your code that I used and modify:
? ? ? ? ? ? ? ? map = new OpenLayers.Map("map");
? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.LayerSwitcher());
? ? ? ?
? ? ? ? ? ? ? ? //create layer
? ? ? ? ? ? ? ? var ?velayer = new OpenLayers.Layer.VirtualEarth(
? ? ? ? ? ? ? ? ? ? ? ? "Roads Layer",
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type': VEMapStyle.Road
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? );
? ? ? ?
? ? ? ? ? ? ? ? var velayer2 = new OpenLayers.Layer.VirtualEarth(
? ? ? ? ? ? ? ? ? ? ? ? "Aerial Layer",
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type': VEMapStyle.Aerial
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? );
? ? ? ? ? ? ? ? map.addLayers([velayer, velayer2]);
? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.PanZoomBar());
? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.ScaleLine());
? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.MousePosition());
? ? ? ? ? ? ? ? map.setCenter(new OpenLayers.LonLat(17, 43), 12);
Sincerly,
J?rome
eoinyp wrote:
Im a newbie, having problem with my map layers. Which ever layer I add first is visible when the map loads, but when I try to switch layers they both disappear. I seem to be missing something fundamental, though I cant figure out what!!
I am creating the layers and map as follows:
?init(){
create layer 1
create layer 2
add([layer1,layer2])
add[map controls]
}
The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm
Any help greatly appreciated,
Thanks,
Eoinyp
View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html
To unsubscribe from Disappearing layers, click here.
--
View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3438091.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/2a132934/attachment.html
From jerome.freyre at hispeed.ch Thu Aug 13 09:56:54 2009
From: jerome.freyre at hispeed.ch (Jerome Freyre)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Disappearing layers
In-Reply-To: <1250171539753-3438091.post@n2.nabble.com>
References: <1250158081909-3436866.post@n2.nabble.com>
<1250163632706-3437329.post@n2.nabble.com>
<1250171539753-3438091.post@n2.nabble.com>
Message-ID: <1250171814878-3438116.post@n2.nabble.com>
You're welcome ;)
Le 13 ao?t 09 ? 15:52, eoinyp (via Nabble) a ?crit :
> Perfect! :)
> Thank you Jerome.
>
> --- On Thu, 13/8/09, Jerome Freyre (via Nabble) <[hidden email]>
> wrote:
>
> From: Jerome Freyre (via Nabble) <[hidden email]>
> Subject: Re: [OpenLayers-Users] Disappearing layers
> To: "eoinyp" <[hidden email]>
> Date: Thursday, 13 August, 2009, 12:40 PM
>
> Hi Eoinyp,
>
> I watched your code. I think you made a mistake with the zoom level
> on the function map.setCenter().
>
> Try to modify the line like that:
> map.setCenter(new OpenLayers.LonLat(17, 43), 12);
>
> It should work ;)
>
> Here is the copy of your code that I used and modify:
> map = new OpenLayers.Map("map");
> map.addControl(new
> OpenLayers.Control.LayerSwitcher());
>
> //create layer
> var velayer = new OpenLayers.Layer.VirtualEarth(
> "Roads Layer",
> {
> 'type': VEMapStyle.Road
> }
> );
>
> var velayer2 = new OpenLayers.Layer.VirtualEarth(
> "Aerial Layer",
> {
> 'type': VEMapStyle.Aerial
> }
> );
>
> map.addLayers([velayer, velayer2]);
>
>
> map.addControl(new OpenLayers.Control.PanZoomBar());
> map.addControl(new OpenLayers.Control.ScaleLine());
> map.addControl(new
> OpenLayers.Control.MousePosition());
>
>
> map.setCenter(new OpenLayers.LonLat(17, 43), 12);
>
> Sincerly,
> J??rome
>
>
> eoinyp wrote:
> Im a newbie, having problem with my map layers. Which ever layer I
> add first is visible when the map loads, but when I try to switch
> layers they both disappear. I seem to be missing something
> fundamental, though I cant figure out what!!
> I am creating the layers and map as follows:
>
> init(){
> create layer 1
> create layer 2
> add([layer1,layer2])
> add[map controls]
> }
>
> The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm
>
> Any help greatly appreciated,
> Thanks,
>
> Eoinyp
>
>
> View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html
> To unsubscribe from Disappearing layers, click here.
>
>
>
>
> View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3438091.html
> To unsubscribe from Re: Disappearing layers, click here.
>
--
View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3438116.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/c7e23b6d/attachment.html
From Aaron_Gundel at sjwater.com Thu Aug 13 12:44:32 2009
From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To: <20090813014608.GH31194@metacarta.com>
Message-ID:
Sorry Christopher, I replied to you but I don't think I cc'd the list.
Anyway...
Yes, my html is hosted at a different origin. Yes, I am using a proxy.
Yes, firebug is showing the file loading up. The URL does contain the
requested data and the features are contained within the GML.
Unfortunately no, there's no url to this right now as it's an intranet
site.
Poking around at this further, it looks to be some kind of namespace issue
with what's coming out of geoserver not being read by openlayers. I know
that the basic geometry is valid now, I swapped out some of the elements
[for some I knew that worked, as per the gml example] and changed some
namespace attributes and got it to work. But I can't serve this up from
geoserver, hence the problem. Any idea how to work around this?
Aaron
Christopher Schmidt
08/12/2009 06:46 PM
To
Aaron_Gundel@sjwater.com
cc
users@openlayers.org
Subject
Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
On Wed, Aug 12, 2009 at 03:57:23PM -0700, Aaron_Gundel@sjwater.com wrote:
> Hello,
>
> I am fairly new to the vector layers within openlayers and I had a
> question about their usage. I'm trying to use the gml layer to display
> data from a wfs. (If you're wondering why I'm not using the wfs layer,
> it's because I couldn't find a method to change the wfs url and reload
the
> layer in the wfs layer -- whereas such a method exists within the gml
> layer, seturl). It's not working. I'm using geoserver for the wfs and
> getting a single feature which I want to display in the gml layer. I
> don't know if this is just some inherent incompatibility or if I'm not
> styling the gml layer properly (I've been experimenting with points that
> are being retrieved through the wfs.)
>
> var style = new OpenLayers.Style();
> var rule = new OpenLayers.Rule(
> {
> symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity:
0.5,
> strokeColor: "black"}
> });
> style.addRules([rule]);
> var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs",
> {styleMap:new OpenLayers.StyleMap(style)});
> return gmlLayer;
>
> Anyway, I've confirmed that my wfs call is definitely returning gml -- I
> just can't get it to display. Can anyone help me out here?
is your HTML page hosted at http://mywfscall/htmlpage.html? That is, does
it
share the same origin -- protocol (http), domain (mywfscall), port (80)?
Does Firebug show the remote file getting loaded via XMLHttpRequest?
Does the URL that is requestd contain data?
Does the layer.features property have anything in it?
Can you provide a link?
If not, then you are violating the same origin policy, and need to set up
a proxy:
http://faq.openlayers.org/proxyhost/all/
Regards,
--
Christopher Schmidt
MetaCarta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/b322e845/attachment.html
From crschmidt at metacarta.com Thu Aug 13 13:05:51 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To:
References: <20090813014608.GH31194@metacarta.com>
Message-ID: <20090813170550.GF20270@metacarta.com>
On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote:
> Sorry Christopher, I replied to you but I don't think I cc'd the list.
> Anyway...
>
> Yes, my html is hosted at a different origin. Yes, I am using a proxy.
> Yes, firebug is showing the file loading up. The URL does contain the
> requested data and the features are contained within the GML.
> Unfortunately no, there's no url to this right now as it's an intranet
> site.
>
> Poking around at this further, it looks to be some kind of namespace issue
> with what's coming out of geoserver not being read by openlayers. I know
> that the basic geometry is valid now, I swapped out some of the elements
> [for some I knew that worked, as per the gml example] and changed some
> namespace attributes and got it to work. But I can't serve this up from
> geoserver, hence the problem. Any idea how to work around this?
It might be best to provide a minimal GML file that works and a minimal
GML file that doesn't work, to show the differences, and perhaps help
other people understand how to help you.
Best Regards,
--
Christopher Schmidt
MetaCarta
From esteban.olm at gmail.com Thu Aug 13 13:09:45 2009
From: esteban.olm at gmail.com (Esteban olm)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click. [SOLVED]
In-Reply-To: <4A793C07.9060105@romtelecom.ro>
References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com>
<4A793C07.9060105@romtelecom.ro>
Message-ID: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
Hi,
I'm sorry, but I have a problem.
When I implement this, I can "pan" the map, and when I go over a marker, A
popup appears, and when I go out of the marker, the popup disappear.
That's ok, but after the popup has appear an disappear, now I can not "pan"
the map.
Maybe the popup has deactivated something.
Can anyone help me?
Thanks
Esteban Olm
after a popup is how
2009/8/5 Adrian Popa
> Following Alexandre's suggestion, here's what I did:
>
> ... //in init()
> map.addLayer(markers);
> //add the main select (for regular popups)
> select = new OpenLayers.Control.SelectFeature(markers, {toggle:true,
> clickout: true});
> markers.events.on({ "featureselected": onMarkerSelect,
> "featureunselected": onMarkerUnselect});
>
> //add the second select for tooltips:
> var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, {
> hover: true, highlightOnly: true, renderIntent: "temporary",
> eventListeners: { featurehighlighted: tooltipSelect,
> featureunhighlighted: tooltipUnselect } });
>
> //the order in which you add these lines seems to matter!
> map.addControl(highlightCtrl);
> map.addControl(select);
> highlightCtrl.activate();
> select.activate();
>
> ...//support functions
> var lastFeature = null;
> var tooltipPopup = null;
>
> function tooltipSelect(event){
> var feature = event.feature;
> var selectedFeature = feature;
> //if there is already an opened details window, don\'t draw the
> tooltip
> if(feature.popup != null){
> return;
> }
> //if there are other tooltips active, destroy them
> if(tooltipPopup != null){
> map.removePopup(tooltipPopup);
> tooltipPopup.destroy();
> if(lastFeature != null){
> delete lastFeature.popup;
> tooltipPopup = null;
> }
> }
> lastFeature = feature;
> var tooltipPopup = new OpenLayers.Popup("activetooltip",
> feature.geometry.getBounds().getCenterLonLat(),
> new OpenLayers.Size(80,12),
> " "+feature.attributes.name,
> true );
> //this is messy, but I'm not a CSS guru
> tooltipPopup.contentDiv.style.backgroundColor='ffffcb';
> tooltipPopup.closeDiv.style.backgroundColor='ffffcb';
> tooltipPopup.contentDiv.style.overflow='hidden';
> tooltipPopup.contentDiv.style.padding='3px';
> tooltipPopup.contentDiv.style.margin='0';
> tooltipPopup.closeOnMove = true;
> tooltipPopup.autoSize = true;
> feature.popup = tooltipPopup;
> map.addPopup(tooltipPopup);
> }
> function tooltipUnselect(event){
> var feature = event.feature;
> if(feature != null && feature.popup != null){
> map.removePopup(feature.popup);
> feature.popup.destroy();
> delete feature.popup;
> tooltipPopup = null;
> lastFeature = null;
> }
> }
>
> function onMarkerSelect(event) {
> //unselect any previous selections
> tooltipUnselect(event);
> var feature = event.feature;
> var selectedFeature = feature;
> var popup = new OpenLayers.Popup.FramedCloud("activeAlarm",
> feature.geometry.getBounds().getCenterLonLat(),
> new OpenLayers.Size(100,100),
> "Loading... src='http://$server/map/symbols/ajax-loader.gif' border=0>",
> null, true, onMarkerPopupClose );
> feature.popup = popup;
> popup.setOpacity(0.7);
> map.addPopup(popup);
> //call ajax to get the data
> loadDetails(feature.attributes.description);
> }
> function onMarkerUnselect(event) {
> var feature = event.feature;
> if(feature.popup) {
> map.removePopup(feature.popup);
> feature.popup.destroy();
> delete feature.popup;
> }
> }
> function onMarkerPopupClose(evt) {
> select.unselectAll();
> }
> I hope this helps others trying to add this feature.
>
> Thanks again for your help.
>
> Regards,
> Adrian
>
> Alexandre Dube wrote:
> > Hi Adrian,
> >
> > Take a look at this example (1). You can use 2 SelectFeature
> > controls for what you need, one with hover:true and
> > highlightOnly:true, the other with hover false. The first one won't
> > actually select the feature and you can register 3 kinds of
> > "highlight" events (see the source) to display your small div/popup.
> >
> > Hope this helps,
> >
> > Alexandre
> >
> > (1) http://openlayers.org/dev/examples/highlight-feature.html
> >
> > Adrian Popa wrote:
> >> Hello everyone,
> >>
> >> This is sort of a repeat message of "Re: [OpenLayers-Users]
> >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly
> >> different idea.
> >>
> >> Problem: I want to display a small div/popup with the marker's name
> >> when the user hovers his mouse over the location, and I want to
> >> display a bigger popup when the user actually clicks on the location.
> >>
> >> Current status:
> >> * I can use {hover: true} to register
> >> featureselected/featureunselected when I hover over a marker instead
> >> on when I click on the maker.
> >> * I haven't found any events that could differentiate between hover
> >> and click
> >>
> >> I'm thinking I could register my select control with hover: true and
> >> allow featureselected to execute the same function for both when I
> >> click on the makrer as well as when I hover over the marker. I would
> >> like to know if there's any way to find out in the event inside the
> >> function if the user clicked or not his mouse. Depending on this, I
> >> would show one popup or the other.
> >>
> >> Something like:
> >>
> >> select = new OpenLayers.Control.SelectFeature(markers,
> >> {clickout:true, hover:true});
> >> markers.events.on({ "featureselected": onMarkerSelect,
> >> "featureunselected": onMarkerUnselect, "visibilitychanged":
> >> onMarkerToggle });
> >> map.addControl(select);
> >> select.activate();
> >>
> >> function onMarkerSelect(event){
> >> var feature = event.feature;
> >> //find out if the user clicked or not
> >> var clicked = event.*findAWayToSeeIfTheUserClicked()*;
> >> if(clicked){
> >> //show larger popup
> >> }
> >> else{
> >> //show smaller popup
> >> }
> >> }
> >>
> >> Suggestions are welcome.
> >>
> >> Thanks,
> >> Adrian
> >> ------------------------------------------------------------------------
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users@openlayers.org
> >> http://openlayers.org/mailman/listinfo/users
> >>
> >
> >
>
>
> --
> ---
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/c337c23a/attachment.html
From Aaron_Gundel at sjwater.com Thu Aug 13 13:12:30 2009
From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To: <20090813170550.GF20270@metacarta.com>
Message-ID:
Not a problem, Christopher...
Here's the raw response I get back from geoserver (minus a couple of
unrelated and superflouous elements)...
-121.93380447,37.30239967 -121.93192514,37.30404022
-121.93380447,37.30239967 -121.93192514,37.30404022
-121.93192514,37.30239967 -121.93193417,37.30397591
-121.93193649,37.30398413 -121.93193987,37.30399212
-121.93194428,37.30399977 -121.93194967,37.30400702
-121.93195598,37.30401378 -121.93196313,37.30401997
-121.93197106,37.30402553 -121.93197967,37.3040304
-121.93198887,37.30403452 -121.93200793,37.30404022
-121.93227819,37.30402362 -121.93244372,37.30401651
-121.93260937,37.30401171 -121.9327751,37.30400922
-121.93380447,37.30399679 -121.93380408,37.30382777
-121.93380369,37.30366524 -121.93380331,37.30350359
-121.93380296,37.30335164 -121.93380258,37.30319194
-121.93380227,37.30305845 -121.93380187,37.30289095
-121.93380152,37.3027424 -121.93380111,37.30256592
-121.93380073,37.30240301 -121.93368572,37.30240281
-121.93346706,37.30240242 -121.93313702,37.30240183
-121.93279384,37.30240122 -121.93192514,37.30239967
If I modify this to fit into the mapserver namespace like so, It shows up
correctly on the map.
-121.93380447,37.30239967 -121.93192514,37.30404022
-121.93380447,37.30239967 -121.93192514,37.30404022
-121.93192514,37.30239967 -121.93193417,37.30397591
-121.93193649,37.30398413 -121.93193987,37.30399212
-121.93194428,37.30399977 -121.93194967,37.30400702
-121.93195598,37.30401378 -121.93196313,37.30401997
-121.93197106,37.30402553 -121.93197967,37.3040304
-121.93198887,37.30403452 -121.93200793,37.30404022
-121.93227819,37.30402362 -121.93244372,37.30401651
-121.93260937,37.30401171 -121.9327751,37.30400922
-121.93380447,37.30399679 -121.93380408,37.30382777
-121.93380369,37.30366524 -121.93380331,37.30350359
-121.93380296,37.30335164 -121.93380258,37.30319194
-121.93380227,37.30305845 -121.93380187,37.30289095
-121.93380152,37.3027424 -121.93380111,37.30256592
-121.93380073,37.30240301 -121.93368572,37.30240281
-121.93346706,37.30240242 -121.93313702,37.30240183
-121.93279384,37.30240122 -121.93192514,37.30239967
So I'm not sure what I can/should do about this. Obviously I can't modify
the geoserver response, but I don't know if there's some vendor parameter
that will correct the issue, or if I just can't use the gml layer at all.
Thanks again...
Christopher Schmidt
08/13/2009 10:05 AM
To
Aaron_Gundel@sjwater.com
cc
users@openlayers.org
Subject
Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote:
> Sorry Christopher, I replied to you but I don't think I cc'd the list.
> Anyway...
>
> Yes, my html is hosted at a different origin. Yes, I am using a proxy.
> Yes, firebug is showing the file loading up. The URL does contain the
> requested data and the features are contained within the GML.
> Unfortunately no, there's no url to this right now as it's an intranet
> site.
>
> Poking around at this further, it looks to be some kind of namespace
issue
> with what's coming out of geoserver not being read by openlayers. I
know
> that the basic geometry is valid now, I swapped out some of the elements
> [for some I knew that worked, as per the gml example] and changed some
> namespace attributes and got it to work. But I can't serve this up from
> geoserver, hence the problem. Any idea how to work around this?
It might be best to provide a minimal GML file that works and a minimal
GML file that doesn't work, to show the differences, and perhaps help
other people understand how to help you.
Best Regards,
--
Christopher Schmidt
MetaCarta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/454a066b/attachment.html
From crschmidt at metacarta.com Thu Aug 13 13:19:04 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:44 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To:
References: <20090813170550.GF20270@metacarta.com>
Message-ID: <20090813171903.GG20270@metacarta.com>
On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote:
> Not a problem, Christopher...
>
> Here's the raw response I get back from geoserver (minus a couple of
> unrelated and superflouous elements)...
>
>
^^ Is this really the start of the file? Nothing else? This is clearly a
problem, because there are no namespaces defined here, so this is invalid
XML. It seems like something here is misconfigured on the server, so I'd
take this to the GeoServer list and see if they have any ideas. I know that
the GML support in OPenLayers was built entirely around GeoServer, so there's
no reason to believe that it shouldn't/couldn't work.
-- Chris
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> If I modify this to fit into the mapserver namespace like so, It shows up
> correctly on the map.
>
>
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> So I'm not sure what I can/should do about this. Obviously I can't modify
> the geoserver response, but I don't know if there's some vendor parameter
> that will correct the issue, or if I just can't use the gml layer at all.
> Thanks again...
>
>
>
>
> Christopher Schmidt
> 08/13/2009 10:05 AM
>
> To
> Aaron_Gundel@sjwater.com
> cc
> users@openlayers.org
> Subject
> Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
>
>
>
>
>
>
> On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote:
> > Sorry Christopher, I replied to you but I don't think I cc'd the list.
> > Anyway...
> >
> > Yes, my html is hosted at a different origin. Yes, I am using a proxy.
> > Yes, firebug is showing the file loading up. The URL does contain the
> > requested data and the features are contained within the GML.
> > Unfortunately no, there's no url to this right now as it's an intranet
> > site.
> >
> > Poking around at this further, it looks to be some kind of namespace
> issue
> > with what's coming out of geoserver not being read by openlayers. I
> know
> > that the basic geometry is valid now, I swapped out some of the elements
>
> > [for some I knew that worked, as per the gml example] and changed some
> > namespace attributes and got it to work. But I can't serve this up from
>
> > geoserver, hence the problem. Any idea how to work around this?
>
> It might be best to provide a minimal GML file that works and a minimal
> GML file that doesn't work, to show the differences, and perhaps help
> other people understand how to help you.
>
> Best Regards,
> --
> Christopher Schmidt
> MetaCarta
>
--
Christopher Schmidt
MetaCarta
From Kai-Behncke at gmx.de Thu Aug 13 13:25:28 2009
From: Kai-Behncke at gmx.de (Kai Behncke)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Defining WFS-filter dynamically
In-Reply-To: <20090813125226.28820@gmx.net>
References: <20090813125226.28820@gmx.net>
Message-ID: <20090813172528.39760@gmx.net>
Dear users,
>
> I try to set a WFS-filter dynamically.
I found a solution now.
If I get e.g a list of comma-separated objekt_ids (4,20,56,.....) that shall be filtered in the wfs
I do:
suchobjekte = new String(suchobjekte);
y=suchobjekte.split(",");
var filter_body;
var filter_header = '<'+'?xml version="1.0" encoding="ISO-8859-1"?>';
var filter_footer = '';
var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"});
var xml = new OpenLayers.Format.XML();
var wfs_url = "http://www.xyz.de/cgi-bin/mapserv?map=/............./ows.map";
if(y.length > 1) {
filter_body_1='';
filter_body_2="";
filter_body_3='';
for(var i=0;i< y.length;i++){
alert (y[i]);
filter_body_2= filter_body_2 +'objekt_id'+y[i]+'';
}
filter_body=filter_body_1 + filter_body_2 + filter_body_3;
} else {
var filter_body = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "objekt_id",
value: y[0]
});
filter_body = xml.write(filter_1_1.write(filter_body));
}
var final_filter = filter_header+filter_body+filter_footer;
req = new OpenLayers.Request.POST({
method: "POST",
url: wfs_url,
data: final_filter,
callback: do_what_i_want
});
....with that it works.
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From Aaron_Gundel at sjwater.com Thu Aug 13 13:30:22 2009
From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To: <20090813171903.GG20270@metacarta.com>
Message-ID:
You're correct, Christopher. I was mistaken. I copied and pasted out of
Firefox's xml viewer, which for some reason strips out the namespace
information.
That is what's actually coming out, which I can see when I view the source
or the responsexml. So I'm back to square one again. Trying to figure
out why that which is showing up correctly when I do an abbreviated
example (using the gml example page) isn't working when I try to set the
url dynamically.
Christopher Schmidt
08/13/2009 10:19 AM
To
Aaron_Gundel@sjwater.com
cc
users@openlayers.org
Subject
Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote:
> Not a problem, Christopher...
>
> Here's the raw response I get back from geoserver (minus a couple of
> unrelated and superflouous elements)...
>
>
^^ Is this really the start of the file? Nothing else? This is clearly a
problem, because there are no namespaces defined here, so this is invalid
XML. It seems like something here is misconfigured on the server, so I'd
take this to the GeoServer list and see if they have any ideas. I know
that
the GML support in OPenLayers was built entirely around GeoServer, so
there's
no reason to believe that it shouldn't/couldn't work.
-- Chris
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> If I modify this to fit into the mapserver namespace like so, It shows
up
> correctly on the map.
>
>
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> So I'm not sure what I can/should do about this. Obviously I can't
modify
> the geoserver response, but I don't know if there's some vendor
parameter
> that will correct the issue, or if I just can't use the gml layer at
all.
> Thanks again...
>
>
>
>
> Christopher Schmidt
> 08/13/2009 10:05 AM
>
> To
> Aaron_Gundel@sjwater.com
> cc
> users@openlayers.org
> Subject
> Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
>
>
>
>
>
>
> On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com
wrote:
> > Sorry Christopher, I replied to you but I don't think I cc'd the list.
> > Anyway...
> >
> > Yes, my html is hosted at a different origin. Yes, I am using a
proxy.
> > Yes, firebug is showing the file loading up. The URL does contain the
> > requested data and the features are contained within the GML.
> > Unfortunately no, there's no url to this right now as it's an intranet
> > site.
> >
> > Poking around at this further, it looks to be some kind of namespace
> issue
> > with what's coming out of geoserver not being read by openlayers. I
> know
> > that the basic geometry is valid now, I swapped out some of the
elements
>
> > [for some I knew that worked, as per the gml example] and changed some
> > namespace attributes and got it to work. But I can't serve this up
from
>
> > geoserver, hence the problem. Any idea how to work around this?
>
> It might be best to provide a minimal GML file that works and a minimal
> GML file that doesn't work, to show the differences, and perhaps help
> other people understand how to help you.
>
> Best Regards,
> --
> Christopher Schmidt
> MetaCarta
>
--
Christopher Schmidt
MetaCarta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/653c1fff/attachment.html
From adube at mapgears.com Thu Aug 13 13:51:54 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click. [SOLVED]
In-Reply-To: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com>
<4A793C07.9060105@romtelecom.ro>
<1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
Message-ID: <4A8452BA.7090002@mapgears.com>
Hi,
Esteban olm wrote:
> Hi,
>
> I'm sorry, but I have a problem.
>
> When I implement this, I can "pan" the map, and when I go over a
> marker, A popup appears, and when I go out of the marker, the popup
> disappear.
>
> That's ok, but after the popup has appear an disappear, now I can not
> "pan" the map.
> Maybe the popup has deactivated something.
Use firebug to check if your pan control is active or not, or you could
also use the firebug "Inspect" button to see if there's an extra div
over your map.
Best of luck,
Alexandre
> Can anyone help me?
> Thanks
> Esteban Olm
>
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 13 15:23:24 2009
From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Measure Control - hover label?
In-Reply-To: <4A8452BA.7090002@mapgears.com>
References: <4A7697A0.5030901@romtelecom.ro>
<4A76D414.805@mapgears.com> <4A793C07.9060105@romtelecom.ro><1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
<4A8452BA.7090002@mapgears.com>
Message-ID: <1053B20F24D85F41B57F168351684E2204B8B6B3@0015-its-exmb04.us.saic.com>
I have a MeasureControl setup to draw a line, now I need it to show
distance on hover.
I've used graphicTitle to do this in the past, but I cant seem to figure
out how to do
the same when the feature is built with the control.
I can listen for the measure event, but the vector doesn't appear to get
passed with that event.
Can I get to the feature via the measure event?
Can I get to the measurement data via the feature?
From arevaco90 at yahoo.es Thu Aug 13 15:27:32 2009
From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] CGI and Tomcat
In-Reply-To: <5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com>
References: <1249584285317-3400100.post@n2.nabble.com>
<5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com>
Message-ID: <1250191652219-3440233.post@n2.nabble.com>
Hola,
Seguimos teniendo problemas con la configuraci?n del proxy. Te cuento un
poco los pasos que hemos seguido. Primero de todo nos hemos bajado el
fichero proxy.cgi y instalado python 3.1.
Luego hemos modificado la primera linea del proxy.cgi y hemos puesto:
#!c:/python31/python.exe -u
Despu?s hemos seguido los pasos de la p?gina que nos indicas sin nig?n
problema hasta el paso n?mero 6, ya que no sabemos donde colocar el fichero
proxy.cgi. En nuestro Tomcat tenemos instaladas las siguientes aplicaciones:
geoserver y mapfish. Hemos estado haciendo diversas pruebas pero no
conseguimos encontrar la configuraci?n adecuada.
Tal y como estamos ahora no conseguimos visualizar las carreteras de este
ejemplo de openlayers:
http://openlayers.org/dev/examples/wfs-protocol.html
Tampoco conseguimos que nos funcione haciendo llamadas a un WFS local.
Alguna idea de por donde puede estar el error?
Juan y Gerard
michogar wrote:
>
> Hola Arevalo,
>
> tienes esta tutorial que segu? yo para utilizar el proxy cgi en tomcat.
>
> http://codigoaldescubierto.wordpress.com/2008/02/24/cgis-en-tomcat-bajo-windows/
>
> Saludos.
>
>
>
> El 6 de agosto de 2009 20:44, Juan Ar?valo escribi?:
>
>>
>> Hi all,
>>
>> I am making some progress setting up a WFS-T, it seems that my code works
>> since I don??t get any error, but the layer doesn't display in the map. I
>> have read that this problem can be solved by setting the Proxy Host,
>> however
>> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and
>> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for
>> Apache
>> but not for Tomcat)
>>
>> Does anyone have any ideas on how to solve it?
>>
>> I??ve solved my previous problem with the WFS constructor.
>> Thanks Pierre and Eric for your help!!
>>
>> Cheers!
>>
>> Juan
>> --
>> View this message in context:
>> http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
>
> --
> # michogar
> # Analista Programador SIG
> # GNU/Linux Counter 462666
> # http://www.openstreetmap.org/user/michogar
>
> Una visi?n personal:
> http://michogar.blogspot.com
>
> El d?a a d?a:
> http://twitter.com/michogar
>
>
>
> Sent from Madrid, Spain
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3440233.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From Aaron_Gundel at sjwater.com Thu Aug 13 17:24:36 2009
From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Question about GML/WFS compatibility
and Styling
In-Reply-To: <20090813171903.GG20270@metacarta.com>
Message-ID:
Thanks for your help Christopher. I was able to get this working by
switching my gml version out and reprojecting to my base map coordinate
system. It is working well now. :)
Aaron
Christopher Schmidt
08/13/2009 10:19 AM
To
Aaron_Gundel@sjwater.com
cc
users@openlayers.org
Subject
Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote:
> Not a problem, Christopher...
>
> Here's the raw response I get back from geoserver (minus a couple of
> unrelated and superflouous elements)...
>
>
^^ Is this really the start of the file? Nothing else? This is clearly a
problem, because there are no namespaces defined here, so this is invalid
XML. It seems like something here is misconfigured on the server, so I'd
take this to the GeoServer list and see if they have any ideas. I know
that
the GML support in OPenLayers was built entirely around GeoServer, so
there's
no reason to believe that it shouldn't/couldn't work.
-- Chris
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> If I modify this to fit into the mapserver namespace like so, It shows
up
> correctly on the map.
>
>
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
> -121.93380447,37.30239967 -121.93192514,37.30404022
>
>
>
>
>
>
>
>
>
>
> -121.93192514,37.30239967 -121.93193417,37.30397591
> -121.93193649,37.30398413 -121.93193987,37.30399212
> -121.93194428,37.30399977 -121.93194967,37.30400702
> -121.93195598,37.30401378 -121.93196313,37.30401997
> -121.93197106,37.30402553 -121.93197967,37.3040304
> -121.93198887,37.30403452 -121.93200793,37.30404022
> -121.93227819,37.30402362 -121.93244372,37.30401651
> -121.93260937,37.30401171 -121.9327751,37.30400922
> -121.93380447,37.30399679 -121.93380408,37.30382777
> -121.93380369,37.30366524 -121.93380331,37.30350359
> -121.93380296,37.30335164 -121.93380258,37.30319194
> -121.93380227,37.30305845 -121.93380187,37.30289095
> -121.93380152,37.3027424 -121.93380111,37.30256592
> -121.93380073,37.30240301 -121.93368572,37.30240281
> -121.93346706,37.30240242 -121.93313702,37.30240183
> -121.93279384,37.30240122 -121.93192514,37.30239967
>
>
>
>
>
>
>
>
>
>
>
> So I'm not sure what I can/should do about this. Obviously I can't
modify
> the geoserver response, but I don't know if there's some vendor
parameter
> that will correct the issue, or if I just can't use the gml layer at
all.
> Thanks again...
>
>
>
>
> Christopher Schmidt
> 08/13/2009 10:05 AM
>
> To
> Aaron_Gundel@sjwater.com
> cc
> users@openlayers.org
> Subject
> Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling
>
>
>
>
>
>
> On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com
wrote:
> > Sorry Christopher, I replied to you but I don't think I cc'd the list.
> > Anyway...
> >
> > Yes, my html is hosted at a different origin. Yes, I am using a
proxy.
> > Yes, firebug is showing the file loading up. The URL does contain the
> > requested data and the features are contained within the GML.
> > Unfortunately no, there's no url to this right now as it's an intranet
> > site.
> >
> > Poking around at this further, it looks to be some kind of namespace
> issue
> > with what's coming out of geoserver not being read by openlayers. I
> know
> > that the basic geometry is valid now, I swapped out some of the
elements
>
> > [for some I knew that worked, as per the gml example] and changed some
> > namespace attributes and got it to work. But I can't serve this up
from
>
> > geoserver, hence the problem. Any idea how to work around this?
>
> It might be best to provide a minimal GML file that works and a minimal
> GML file that doesn't work, to show the differences, and perhaps help
> other people understand how to help you.
>
> Best Regards,
> --
> Christopher Schmidt
> MetaCarta
>
--
Christopher Schmidt
MetaCarta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/f2428007/attachment.html
From dwright at i3.com Thu Aug 13 18:14:36 2009
From: dwright at i3.com (David Wright)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] ArcGIS Tiled Map and tokens
Message-ID: <00c601ca1c63$71a96f70$54fc4e50$@com>
Hello Users,
A couple of questions here.
First,
http://dev.openlayers.org/sandbox/august/documentation/agsControl_instructio
ns.pdf
provides a plugin for OpenLayers 2.6 that supports ArcGIS Server TiledMap
service layers. I have been watching for this functionality in the 2.7 and
2.8 releases. I have seen dynamic ArcGISRest93 export (thanks!), but hoping
to see the TiledMap services leveraged in a core release. Is this likely to
happen?
Second, has anyone found a way to access secured ArcGIS Server services in
OpenLayers? In other API's I can pass a token value as parameter in my
application, but I've not found a way to do this in OpenLayers without a
proxy between OpenLayers and ArcGIS Server.
Thanks for any updates or feedback,
-Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/8b2d7030/attachment.html
From john.c.cartwright at comcast.net Thu Aug 13 19:31:35 2009
From: john.c.cartwright at comcast.net (John Cartwright)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer
Message-ID: <4A84A257.70301@comcast.net>
Hello All,
I have OpenLayers.Layer.Vector layer on which I've defined the
"beforefeatureadded" and "beforefeaturesadded" events, e.g.
vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded":
report});
Then I'm adding features to this layer using the
OpenLayersControlDrawFeature control. Problem is that the above events
don't seem to be firing as I add additional features to the layer. The
"featureadded" event fires, but not the "beforefeatureadded".
This is version 2.8. Can someone please point out what I'm doing wrong
here?
Thanks!
--john
From adrian_gh.popa at romtelecom.ro Fri Aug 14 01:32:07 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a
different popup on click. [SOLVED]
In-Reply-To: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com>
<4A793C07.9060105@romtelecom.ro>
<1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com>
Message-ID: <4A84F6D7.80302@romtelecom.ro>
Hello Esteban,
Most likely after the popup closes there is a javascript error in your
page and navigation breaks (zooming in/out shouldn't work at this
point). Use firebug to see if you get an error in the console.
Esteban olm wrote:
> Hi,
>
> I'm sorry, but I have a problem.
>
> When I implement this, I can "pan" the map, and when I go over a
> marker, A popup appears, and when I go out of the marker, the popup
> disappear.
>
> That's ok, but after the popup has appear an disappear, now I can not
> "pan" the map.
> Maybe the popup has deactivated something.
> Can anyone help me?
> Thanks
> Esteban Olm
>
>
> after a popup is how
>
> 2009/8/5 Adrian Popa >
>
> Following Alexandre's suggestion, here's what I did:
>
> ... //in init()
> map.addLayer(markers);
> //add the main select (for regular popups)
> select = new OpenLayers.Control.SelectFeature(markers, {toggle:true,
> clickout: true});
> markers.events.on({ "featureselected": onMarkerSelect,
> "featureunselected": onMarkerUnselect});
>
> //add the second select for tooltips:
> var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, {
> hover: true, highlightOnly: true, renderIntent: "temporary",
> eventListeners: { featurehighlighted:
> tooltipSelect,
> featureunhighlighted: tooltipUnselect } });
>
> //the order in which you add these lines seems to matter!
> map.addControl(highlightCtrl);
> map.addControl(select);
> highlightCtrl.activate();
> select.activate();
>
> ...//support functions
> var lastFeature = null;
> var tooltipPopup = null;
>
> function tooltipSelect(event){
> var feature = event.feature;
> var selectedFeature = feature;
> //if there is already an opened details window, don\'t draw the
> tooltip
> if(feature.popup != null){
> return;
> }
> //if there are other tooltips active, destroy them
> if(tooltipPopup != null){
> map.removePopup(tooltipPopup);
> tooltipPopup.destroy();
> if(lastFeature != null){
> delete lastFeature.popup;
> tooltipPopup = null;
> }
> }
> lastFeature = feature;
> var tooltipPopup = new OpenLayers.Popup("activetooltip",
> feature.geometry.getBounds().getCenterLonLat(),
> new OpenLayers.Size(80,12),
> " "+feature.attributes.name
> ,
> true );
> //this is messy, but I'm not a CSS guru
> tooltipPopup.contentDiv.style.backgroundColor='ffffcb';
> tooltipPopup.closeDiv.style.backgroundColor='ffffcb';
> tooltipPopup.contentDiv.style.overflow='hidden';
> tooltipPopup.contentDiv.style.padding='3px';
> tooltipPopup.contentDiv.style.margin='0';
> tooltipPopup.closeOnMove = true;
> tooltipPopup.autoSize = true;
> feature.popup = tooltipPopup;
> map.addPopup(tooltipPopup);
> }
> function tooltipUnselect(event){
> var feature = event.feature;
> if(feature != null && feature.popup != null){
> map.removePopup(feature.popup);
> feature.popup.destroy();
> delete feature.popup;
> tooltipPopup = null;
> lastFeature = null;
> }
> }
>
> function onMarkerSelect(event) {
> //unselect any previous selections
> tooltipUnselect(event);
> var feature = event.feature;
> var selectedFeature = feature;
> var popup = new OpenLayers.Popup.FramedCloud("activeAlarm",
> feature.geometry.getBounds().getCenterLonLat(),
> new OpenLayers.Size(100,100),
> "Loading... src='http://$server/map/symbols/ajax-loader.gif' border=0>",
> null, true, onMarkerPopupClose );
> feature.popup = popup;
> popup.setOpacity(0.7);
> map.addPopup(popup);
> //call ajax to get the data
> loadDetails(feature.attributes.description);
> }
> function onMarkerUnselect(event) {
> var feature = event.feature;
> if(feature.popup) {
> map.removePopup(feature.popup);
> feature.popup.destroy();
> delete feature.popup;
> }
> }
> function onMarkerPopupClose(evt) {
> select.unselectAll();
> }
> I hope this helps others trying to add this feature.
>
> Thanks again for your help.
>
> Regards,
> Adrian
>
> Alexandre Dube wrote:
> > Hi Adrian,
> >
> > Take a look at this example (1). You can use 2 SelectFeature
> > controls for what you need, one with hover:true and
> > highlightOnly:true, the other with hover false. The first one won't
> > actually select the feature and you can register 3 kinds of
> > "highlight" events (see the source) to display your small div/popup.
> >
> > Hope this helps,
> >
> > Alexandre
> >
> > (1) http://openlayers.org/dev/examples/highlight-feature.html
> >
> > Adrian Popa wrote:
> >> Hello everyone,
> >>
> >> This is sort of a repeat message of "Re: [OpenLayers-Users]
> >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly
> >> different idea.
> >>
> >> Problem: I want to display a small div/popup with the marker's name
> >> when the user hovers his mouse over the location, and I want to
> >> display a bigger popup when the user actually clicks on the
> location.
> >>
> >> Current status:
> >> * I can use {hover: true} to register
> >> featureselected/featureunselected when I hover over a marker
> instead
> >> on when I click on the maker.
> >> * I haven't found any events that could differentiate between hover
> >> and click
> >>
> >> I'm thinking I could register my select control with hover:
> true and
> >> allow featureselected to execute the same function for both when I
> >> click on the makrer as well as when I hover over the marker. I
> would
> >> like to know if there's any way to find out in the event inside the
> >> function if the user clicked or not his mouse. Depending on this, I
> >> would show one popup or the other.
> >>
> >> Something like:
> >>
> >> select = new OpenLayers.Control.SelectFeature(markers,
> >> {clickout:true, hover:true});
> >> markers.events.on({ "featureselected": onMarkerSelect,
> >> "featureunselected": onMarkerUnselect, "visibilitychanged":
> >> onMarkerToggle });
> >> map.addControl(select);
> >> select.activate();
> >>
> >> function onMarkerSelect(event){
> >> var feature = event.feature;
> >> //find out if the user clicked or not
> >> var clicked = event.*findAWayToSeeIfTheUserClicked()*;
> >> if(clicked){
> >> //show larger popup
> >> }
> >> else{
> >> //show smaller popup
> >> }
> >> }
> >>
> >> Suggestions are welcome.
> >>
> >> Thanks,
> >> Adrian
> >>
> ------------------------------------------------------------------------
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users@openlayers.org
> >> http://openlayers.org/mailman/listinfo/users
> >>
> >
> >
>
>
> --
> ---
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/ba6c580d/attachment.html
From manuel.albela at gmail.com Fri Aug 14 02:58:00 2009
From: manuel.albela at gmail.com (Manuel Albela Miranda)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To: <1250163801347-3437344.post@n2.nabble.com>
References:
<1250163801347-3437344.post@n2.nabble.com>
Message-ID:
Hi again!
Thank you very much Ivan and Jerome for you help. Clusters work great!, just
what I needed.
Best regards, and thank you again!
Manu
On Thu, Aug 13, 2009 at 1:43 PM, Jerome Freyre wrote:
>
> Hi Manuel,
>
> Another way should be the use of the cluster strategy.
> If you activate the strategy, all closest points are transform in one
> feature called cluster. And the cluster contains points so you can easily
> display informations about your points.
>
> http://openlayers.org/dev/examples/strategy-cluster.html
>
>
>
>
> Manuel Albela Miranda wrote:
> >
> > Hi everybody!,
> >
> > I have one GML layer where some of the points are in the same location,
> so
> > I'm wondering if it's possible to get all the features that are at that
> > location when you click on it by using the SelectFeature control or if
> > there
> > is another way to do that.
> >
> > Thank you very much in advance.
> >
> > Manu.
> >
> > _______________________________________________
> > Users mailing list
> > Users@openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/18c101b7/attachment.html
From igrcic at gmail.com Fri Aug 14 03:08:02 2009
From: igrcic at gmail.com (Ivan Grcic)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Selecting multiple features in the same point
In-Reply-To:
References:
<1250163801347-3437344.post@n2.nabble.com>
Message-ID:
Yes, cluster is pretty nice feature to have. I advise to use it with
BBOX strategy, especially if u have lots of features!
Cheers
On Fri, Aug 14, 2009 at 8:58 AM, Manuel Albela
Miranda wrote:
> Hi again!
>
> Thank you very much Ivan and Jerome for you help. Clusters work great!, just
> what I needed.
>
> Best regards, and thank you again!
>
> Manu
>
> On Thu, Aug 13, 2009 at 1:43 PM, Jerome Freyre
> wrote:
>>
>> Hi Manuel,
>>
>> Another way should be the use of the cluster strategy.
>> If you activate the strategy, all closest points are transform in one
>> feature called cluster. And the cluster contains points so you can easily
>> display informations about your points.
>>
>> http://openlayers.org/dev/examples/strategy-cluster.html
>>
>>
>>
>>
>> Manuel Albela Miranda wrote:
>> >
>> > Hi everybody!,
>> >
>> > I have one GML layer where some of the points are in the same location,
>> > so
>> > I'm wondering if it's possible to get all the features that are at that
>> > location when you click on it by using the SelectFeature control or if
>> > there
>> > is another way to do that.
>> >
>> > Thank you very much in advance.
>> >
>> > Manu.
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users@openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>> >
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
Ivan Grcic
From eric.lemoine at camptocamp.com Fri Aug 14 03:35:00 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer
In-Reply-To: <4A84A257.70301@comcast.net>
References: <4A84A257.70301@comcast.net>
Message-ID:
On Friday, August 14, 2009, John Cartwright
wrote:
> Hello All,
>
> I have OpenLayers.Layer.Vector layer on which I've defined the
> "beforefeatureadded" and "beforefeaturesadded" events, e.g.
>
> vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded":
> report});
>
> Then I'm adding features to this layer using the
> OpenLayersControlDrawFeature control. ?Problem is that the above events
> don't seem to be firing as I add additional features to the layer. ?The
> "featureadded" event fires, but not the "beforefeatureadded".
>
> This is version 2.8. ?Can someone please point out what I'm doing wrong
> here?
Hi.
this is weird. Can you reproduce that in a minimal example with just a
vector layer and a draw feature control?
Cheers,
>
> Thanks!
>
> --john
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From xiaying4415139 at 163.com Fri Aug 14 03:42:54 2009
From: xiaying4415139 at 163.com (shane_china)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] about Navigation and Box Control
In-Reply-To: <133009.25562.qm@web15104.mail.cnb.yahoo.com>
References: <133009.25562.qm@web15104.mail.cnb.yahoo.com>
Message-ID: <1250235774795-3443556.post@n2.nabble.com>
I thought, you want to draw box and zoom. Do you notice that there is ZoomBox
Control in OpenLayers?
?? ? wrote:
>
> Hi:
> ????? I have a problem,i can't use Navigation
> Control(OpenLayers.Control.Navigation()) when i have used Box Control like
> this :
> ??? var control = new OpenLayers.Control();
> ??????????????? OpenLayers.Util.extend(control, {
> ??????????????????? draw: function () {
> ??????????????????????? // this Handler.Box will intercept the
> shift-mousedown
> ??????????????????????? // before Control.MouseDefault gets to see it
> ??????????????????????? this.box = new OpenLayers.Handler.Box( control,
> ??????????????????????????? {"done": this.notice},
> ??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL});
> ??????????????????????? this.box.activate();
> ??????????????????? },
>
> ??????????????????? notice: function (bounds) {
> ??????????????????????? var ll = map.getLonLatFromPixel(new
> OpenLayers.Pixel(bounds.left, bounds.bottom));
> ??????????????????????? var ur = map.getLonLatFromPixel(new
> OpenLayers.Pixel(bounds.right, bounds.top));
> ??????????????????????? var rowlength =
> document.all("table1").rows.length;
> ??????????????????????? for(var i=1; i ??????????????????????? ???
> document.all("table1").rows[i].cells[1].bgColor = "#ffffff";
> ??????????????????????? ??? var x =
> document.all("table1").rows[i].cells[4].innerText;
> ??????????????????????? ??? var y =
> document.all("table1").rows[i].cells[5].innerText;
> ??????????????????????? ???
> if(x>ll.lon.toFixed(4)&&xll.lat.toFixed(4)&&y ??????????????????????? ??? //??? alert("sucess");
> ??????????????????????? ??? ???
> document.all("table1").rows[i].cells[1].bgColor = "#00FFFF";
> ??????????????????????? ??? }
> ??????????????????????? }
> ??????????????????????? alert(ll.lon.toFixed(4) + ", " +
> ????????????????????????????? ll.lat.toFixed(4) + ", " +
> ????????????????????????????? ur.lon.toFixed(4) + ", " +
> ????????????????????????????? ur.lat.toFixed(4));
> ??????????????????? }
> ??????????????? });
> ? i want them work together,how can i do ? thanks
>
>
>
>
> ___________________________________________________________
> ?????????????????
> http://card.mail.cn.yahoo.com/
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/about-Navigation-and-Box-Control-tp3435061p3443556.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From xiaying4415139 at 163.com Fri Aug 14 03:52:56 2009
From: xiaying4415139 at 163.com (shane_china)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Animate effect like Virtual Earth?
Message-ID: <1250236376983-3443597.post@n2.nabble.com>
When I saw this Virtual Earth Example
http://openlayers.org/dev/examples/ve-novibrate.html
http://openlayers.org/dev/examples/ve-novibrate.html , Its zoom effect
shocked me. I notice that there are two lines in the source code
panMethod: OpenLayers.Easing.Linear.easeOut,
panDuration: 10
I added them to my own map with WMS layer but it doesn't work. Is there some
method can make WMS layer has the same animate zoom effect like Virtual
Earth? I already know transitionEffect: 'resize', but I think it is not as
fantastic as Virtual Earth.
Thanks
--
View this message in context: http://n2.nabble.com/Animate-effect-like-Virtual-Earth--tp3443597p3443597.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From derek at cmainfo.co.za Fri Aug 14 05:00:36 2009
From: derek at cmainfo.co.za (Derek Watling)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] IE7 Error when adding vector layer
Message-ID: <1250240436155-3443849.post@n2.nabble.com>
I am having problems with IE7 when adding a vector layer to the map.
I am using ASP.NET with a Master page and a custom build of OpenLayers 2.8.
The begining of my Master page is as follows:
<%@ Master Language="VB" CodeFile="CMAMaster.master.vb"
Inherits="MasterPage" %>
...
The OpenLayers.js is then included in the ScriptManagerProxy for the pages
that require it.
Everything works perfectly in IE8, Firefox and Safari with these settings.
However IE7 usually (but not always) gives an "Unspecified error". If I
remove the vector layer from the map it works fine in IE7.
The code to add the vector layer is:
...
var SPStyle = {
strokeColor: 'red',
strokeWidth: 2,
fillColor: 'red',
fillOpacity: '0.15',
borderStyle: 'solid'
}
SPLayer = new OpenLayers.Layer.Vector("Subject Property");
SPLayer.displayInLayerSwitcher = false;
SPLayer.style = SPStyle;
map.addLayer(SPLayer);
...
Any help on how to work around this issue would be greatly appreciated.
--
View this message in context: http://n2.nabble.com/IE7-Error-when-adding-vector-layer-tp3443849p3443849.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From rahul_g_teni at yahoo.com Fri Aug 14 08:08:13 2009
From: rahul_g_teni at yahoo.com (Mr. Rahul Teni)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Get bounding box.
Message-ID: <649139.40669.qm@web65611.mail.ac4.yahoo.com>
Dear List,
I required following things to be implemented in OpenLayer.
I want bounding box of tile of layer which is overlayed on google layers and? is generated with tileCache. I will then create request to regenerate tile.
Does anybody have any pointers how to get bounding box of tile on which i have clicked with mouse or any pointers to calculation.
Your help is highly appreciated.
Thanks,
Rahul G. Teni
MS BITS,BE Comp
9822564489
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/66a69139/attachment.html
From Kai-Behncke at gmx.de Fri Aug 14 08:28:35 2009
From: Kai-Behncke at gmx.de (Kai Behncke)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
Message-ID: <20090814122835.228450@gmx.net>
Dear users,
I would like to start a function if the layer is on/off.
I tried e.g.
if (this.map.events.triggerEvent("changelayer")){
alert ("here we go");
}
and
if (my_layer.display()){
alert ("here we go");
}
...but so far without success.
Can anybody help please?
Thank you very much, Kai
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From adube at mapgears.com Fri Aug 14 08:37:41 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
In-Reply-To: <20090814122835.228450@gmx.net>
References: <20090814122835.228450@gmx.net>
Message-ID: <4A855A95.3070806@mapgears.com>
Hi Kai,
Maybe the layer's event "visibilitychanged" could be what you need.
Regards,
Alexandre
Kai Behncke wrote:
> Dear users,
>
>
>
>
> I would like to start a function if the layer is on/off.
>
> I tried e.g.
>
>
> if (this.map.events.triggerEvent("changelayer")){
> alert ("here we go");
> }
>
>
> and
>
> if (my_layer.display()){
>
> alert ("here we go");
> }
>
>
> ...but so far without success.
> Can anybody help please?
>
> Thank you very much, Kai
>
--
Alexandre Dub?
Mapgears
www.mapgears.com
From adrian_gh.popa at romtelecom.ro Fri Aug 14 08:37:30 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
In-Reply-To: <20090814122835.228450@gmx.net>
References: <20090814122835.228450@gmx.net>
Message-ID: <4A855A8A.9060803@romtelecom.ro>
Hello Kai,
Not sure if this is what you're looking for, but I registered my
function to run when the layer changes visibility (is toggled on/off):
markers.events.on({ "featureselected": onMarkerSelect,
"featureunselected": onMarkerUnselect, *"visibilitychanged":
onMarkerToggle* });
markers is a Vector layer, but the event should be available for every
layer. You can check in your function to see if the layer has been
toggled off or on by looking at markers.visibility:
*function onMarkerToggle(event) {
//do something if visibility becomes true
if(markers.visibility == true){
alert("This layer just turned visible!");
}
}
*
Regards,
Adrian
Kai Behncke wrote:
> Dear users,
>
>
>
>
> I would like to start a function if the layer is on/off.
>
> I tried e.g.
>
>
> if (this.map.events.triggerEvent("changelayer")){
> alert ("here we go");
> }
>
>
> and
>
> if (my_layer.display()){
>
> alert ("here we go");
> }
>
>
> ...but so far without success.
> Can anybody help please?
>
> Thank you very much, Kai
>
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/25541e26/attachment.html
From Kai-Behncke at gmx.de Fri Aug 14 09:02:14 2009
From: Kai-Behncke at gmx.de (Kai Behncke)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
In-Reply-To: <4A855A8A.9060803@romtelecom.ro>
References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro>
Message-ID: <20090814130214.24140@gmx.net>
Hi Adrian, Hi Alexandre,
thank you for your hints, nevertheless I didn`t get it.
With "my_layer.visibility" I will get easily the status (true/false),
but the problem I have is that I don`t know how to get the function setVisibility() (that is called after activatin/deactivating a layer in Control.LayerSwitcher).
I mean:
I turn the layer on/off and the function obviously is called.
But how can I do a request on that?
Something like:
if (setVisibility()) {
alert ("change");
alert (my_layer.visibility);
}
of
If this.map.events.triggerEvent("visibilitychanged")) {
...
....
}
Well, I will try on.....
Best regards, Kai
-------- Original-Nachricht --------
> Datum: Fri, 14 Aug 2009 15:37:30 +0300
> Von: Adrian Popa
> An: Kai Behncke
> CC: users@openlayers.org
> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed
> Hello Kai,
>
> Not sure if this is what you're looking for, but I registered my
> function to run when the layer changes visibility (is toggled on/off):
>
> markers.events.on({ "featureselected": onMarkerSelect,
> "featureunselected": onMarkerUnselect, *"visibilitychanged":
> onMarkerToggle* });
>
> markers is a Vector layer, but the event should be available for every
> layer. You can check in your function to see if the layer has been
> toggled off or on by looking at markers.visibility:
>
> *function onMarkerToggle(event) {
> //do something if visibility becomes true
> if(markers.visibility == true){
> alert("This layer just turned visible!");
> }
> }
> *
> Regards,
> Adrian
> Kai Behncke wrote:
> > Dear users,
> >
> >
> >
> >
> > I would like to start a function if the layer is on/off.
> >
> > I tried e.g.
> >
> >
> > if (this.map.events.triggerEvent("changelayer")){
> > alert ("here we go");
> > }
> >
> >
> > and
> >
> > if (my_layer.display()){
> >
> > alert ("here we go");
> > }
> >
> >
> > ...but so far without success.
> > Can anybody help please?
> >
> > Thank you very much, Kai
> >
>
>
> --
> ---
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
>
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From crschmidt at metacarta.com Fri Aug 14 09:03:39 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] IE7 Error when adding vector layer
In-Reply-To: <1250240436155-3443849.post@n2.nabble.com>
References: <1250240436155-3443849.post@n2.nabble.com>
Message-ID: <20090814130339.GK20270@metacarta.com>
On Fri, Aug 14, 2009 at 04:00:36AM -0500, Derek Watling wrote:
>
> I am having problems with IE7 when adding a vector layer to the map.
>
> I am using ASP.NET with a Master page and a custom build of OpenLayers 2.8.
> The begining of my Master page is as follows:
>
> <%@ Master Language="VB" CodeFile="CMAMaster.master.vb"
> Inherits="MasterPage" %>
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
>
>
>
> ...
>
> The OpenLayers.js is then included in the ScriptManagerProxy for the pages
> that require it.
>
> Everything works perfectly in IE8, Firefox and Safari with these settings.
> However IE7 usually (but not always) gives an "Unspecified error". If I
> remove the vector layer from the map it works fine in IE7.
>
> The code to add the vector layer is:
> ...
> var SPStyle = {
> strokeColor: 'red',
> strokeWidth: 2,
> fillColor: 'red',
> fillOpacity: '0.15',
> borderStyle: 'solid'
> }
>
> SPLayer = new OpenLayers.Layer.Vector("Subject Property");
> SPLayer.displayInLayerSwitcher = false;
> SPLayer.style = SPStyle;
> map.addLayer(SPLayer);
> ...
>
> Any help on how to work around this issue would be greatly appreciated.
Most likely, you are launching your code too early. Make sure you wait
until the page's "onload" event to start your code.
--
Christopher Schmidt
MetaCarta
From adrian_gh.popa at romtelecom.ro Fri Aug 14 09:15:11 2009
From: adrian_gh.popa at romtelecom.ro (Adrian Popa)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
In-Reply-To: <20090814130214.24140@gmx.net>
References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro>
<20090814130214.24140@gmx.net>
Message-ID: <4A85635F.6090606@romtelecom.ro>
Hello Kai,
Are you trying to turn the layer on/off from outside the Layer Switcher?
Regards,
Adrian
Kai Behncke wrote:
> Hi Adrian, Hi Alexandre,
>
>
> thank you for your hints, nevertheless I didn`t get it.
>
>
> With "my_layer.visibility" I will get easily the status (true/false),
> but the problem I have is that I don`t know how to get the function setVisibility() (that is called after activatin/deactivating a layer in Control.LayerSwitcher).
>
> I mean:
> I turn the layer on/off and the function obviously is called.
>
> But how can I do a request on that?
>
>
> Something like:
>
> if (setVisibility()) {
> alert ("change");
> alert (my_layer.visibility);
> }
> of
>
> If this.map.events.triggerEvent("visibilitychanged")) {
> ...
> ....
> }
>
> Well, I will try on.....
>
>
> Best regards, Kai
>
>
>
>
>
>
>
>
> -------- Original-Nachricht --------
>
>> Datum: Fri, 14 Aug 2009 15:37:30 +0300
>> Von: Adrian Popa
>> An: Kai Behncke
>> CC: users@openlayers.org
>> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed
>>
>
>
>> Hello Kai,
>>
>> Not sure if this is what you're looking for, but I registered my
>> function to run when the layer changes visibility (is toggled on/off):
>>
>> markers.events.on({ "featureselected": onMarkerSelect,
>> "featureunselected": onMarkerUnselect, *"visibilitychanged":
>> onMarkerToggle* });
>>
>> markers is a Vector layer, but the event should be available for every
>> layer. You can check in your function to see if the layer has been
>> toggled off or on by looking at markers.visibility:
>>
>> *function onMarkerToggle(event) {
>> //do something if visibility becomes true
>> if(markers.visibility == true){
>> alert("This layer just turned visible!");
>> }
>> }
>> *
>> Regards,
>> Adrian
>> Kai Behncke wrote:
>>
>>> Dear users,
>>>
>>>
>>>
>>>
>>> I would like to start a function if the layer is on/off.
>>>
>>> I tried e.g.
>>>
>>>
>>> if (this.map.events.triggerEvent("changelayer")){
>>> alert ("here we go");
>>> }
>>>
>>>
>>> and
>>>
>>> if (my_layer.display()){
>>>
>>> alert ("here we go");
>>> }
>>>
>>>
>>> ...but so far without success.
>>> Can anybody help please?
>>>
>>> Thank you very much, Kai
>>>
>>>
>> --
>> ---
>> Adrian Popa
>> NOC Division
>> Network Engineer
>> Divizia Centrul National de Operare Retea
>> Departament Transport IP & Metro
>> Compartiment IP Core & Backbone
>> Phone: +40 21 400 3099
>>
>>
>
>
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/7013c2d9/attachment.html
From Kai-Behncke at gmx.de Fri Aug 14 09:20:07 2009
From: Kai-Behncke at gmx.de (Kai Behncke)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Starting function if layerstatus is changed
In-Reply-To: <4A85635F.6090606@romtelecom.ro>
References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro>
<20090814130214.24140@gmx.net> <4A85635F.6090606@romtelecom.ro>
Message-ID: <20090814132007.24110@gmx.net>
Dear users,
problem solved.
In
.....openlayers/lib/OpenLayers/Layers.js
an
setVisibility: function(visibility) {
//alert (ows.visibility);
if (visibility != this.visibility) {
this.visibility = visibility;
this.display(visibility);
this.redraw();
if (this.map != null) {
this.map.events.triggerEvent("changelayer", {
layer: this,
property: "visibility"
});
}
this.events.triggerEvent("visibilitychanged");
if (my_layer.visibility!=true){
alert ("false");
.....
..........
}
}
...does what I want.
Best regards and Thank you, Kai
-------- Original-Nachricht --------
> Datum: Fri, 14 Aug 2009 16:15:11 +0300
> Von: Adrian Popa
> An: Kai Behncke
> CC: users@openlayers.org
> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed
> Hello Kai,
>
> Are you trying to turn the layer on/off from outside the Layer Switcher?
>
> Regards,
> Adrian
>
> Kai Behncke wrote:
> > Hi Adrian, Hi Alexandre,
> >
> >
> > thank you for your hints, nevertheless I didn`t get it.
> >
> >
> > With "my_layer.visibility" I will get easily the status (true/false),
> > but the problem I have is that I don`t know how to get the function
> setVisibility() (that is called after activatin/deactivating a layer in
> Control.LayerSwitcher).
> >
> > I mean:
> > I turn the layer on/off and the function obviously is called.
> >
> > But how can I do a request on that?
> >
> >
> > Something like:
> >
> > if (setVisibility()) {
> > alert ("change");
> > alert (my_layer.visibility);
> > }
> > of
> >
> > If this.map.events.triggerEvent("visibilitychanged")) {
> > ...
> > ....
> > }
> >
> > Well, I will try on.....
> >
> >
> > Best regards, Kai
> >
> >
> >
> >
> >
> >
> >
> >
> > -------- Original-Nachricht --------
> >
> >> Datum: Fri, 14 Aug 2009 15:37:30 +0300
> >> Von: Adrian Popa
> >> An: Kai Behncke
> >> CC: users@openlayers.org
> >> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is
> changed
> >>
> >
> >
> >> Hello Kai,
> >>
> >> Not sure if this is what you're looking for, but I registered my
> >> function to run when the layer changes visibility (is toggled on/off):
> >>
> >> markers.events.on({ "featureselected": onMarkerSelect,
> >> "featureunselected": onMarkerUnselect, *"visibilitychanged":
> >> onMarkerToggle* });
> >>
> >> markers is a Vector layer, but the event should be available for every
> >> layer. You can check in your function to see if the layer has been
> >> toggled off or on by looking at markers.visibility:
> >>
> >> *function onMarkerToggle(event) {
> >> //do something if visibility becomes true
> >> if(markers.visibility == true){
> >> alert("This layer just turned visible!");
> >> }
> >> }
> >> *
> >> Regards,
> >> Adrian
> >> Kai Behncke wrote:
> >>
> >>> Dear users,
> >>>
> >>>
> >>>
> >>>
> >>> I would like to start a function if the layer is on/off.
> >>>
> >>> I tried e.g.
> >>>
> >>>
> >>> if (this.map.events.triggerEvent("changelayer")){
> >>> alert ("here we go");
> >>> }
> >>>
> >>>
> >>> and
> >>>
> >>> if (my_layer.display()){
> >>>
> >>> alert ("here we go");
> >>> }
> >>>
> >>>
> >>> ...but so far without success.
> >>> Can anybody help please?
> >>>
> >>> Thank you very much, Kai
> >>>
> >>>
> >> --
> >> ---
> >> Adrian Popa
> >> NOC Division
> >> Network Engineer
> >> Divizia Centrul National de Operare Retea
> >> Departament Transport IP & Metro
> >> Compartiment IP Core & Backbone
> >> Phone: +40 21 400 3099
> >>
> >>
> >
> >
>
>
> --
> ---
> Adrian Popa
> NOC Division
> Network Engineer
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core & Backbone
> Phone: +40 21 400 3099
>
--
GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From derek at cmainfo.co.za Fri Aug 14 09:58:37 2009
From: derek at cmainfo.co.za (Derek Watling)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] IE7 Error when adding vector layer
In-Reply-To: <20090814130339.GK20270@metacarta.com>
References: <1250240436155-3443849.post@n2.nabble.com>
<20090814130339.GK20270@metacarta.com>
Message-ID: <1250258317005-3445225.post@n2.nabble.com>
Hi Christopher
Thank you for your reply.
I have a chain of functions/PageMethods that are called starting in the
pageLoad() function as I need other information before the map is
initialised. Each PageMethod waits for the results to be returned and
handled before calling the next one.
However, after much searching and examining information from Microsoft's
forums I have made the following change which seems to have solved the
problem:
Seems like IE7 wasn't always getting this from the javascript.
Christopher Schmidt-2 wrote:
>
> Most likely, you are launching your code too early. Make sure you wait
> until the page's "onload" event to start your code.
>
> --
> Christopher Schmidt
> MetaCarta
>
--
View this message in context: http://n2.nabble.com/IE7-Error-when-adding-vector-layer-tp3443849p3445225.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From hagen1113 at yahoo.com Fri Aug 14 10:41:13 2009
From: hagen1113 at yahoo.com (Raul David Orozco)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Add extra parameters to getfeatureinfo request
Message-ID: <79677.67433.qm@web51403.mail.re2.yahoo.com>
Hi to everyone. I'm using this piece of code to make a getfeatureinfo request:
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'dir/smms/wms.php',
title: 'Identify features by clicking',
queryVisible: true,
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new OpenLayers.Popup.FramedCloud(
"myagri",
map.getLonLatFromPixel(event.xy),
null,
event.text,
null,
true
));
}
}
});
map.addControl(info);
info.activate();
And it works fine, I get my info back as I need it, but I have to send some extra parameters with getfeatureinfo request for example ''REPORT":"YES" but I don't know how to do it. Any help will be appreciated, and if everyone can suggest me a better way to do the features request that would be great. Thanks in advance.
____________________________________________________________________________________
?Obt?n la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8.
http://downloads.yahoo.com/ieak8/?l=e1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/56ed1f6f/attachment.html
From eric.lemoine at camptocamp.com Fri Aug 14 12:29:21 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Add extra parameters to getfeatureinfo
request
In-Reply-To: <79677.67433.qm@web51403.mail.re2.yahoo.com>
References: <79677.67433.qm@web51403.mail.re2.yahoo.com>
Message-ID:
On Fri, Aug 14, 2009 at 4:41 PM, Raul David Orozco wrote:
> Hi to everyone. I'm using this piece of code to make a getfeatureinfo
> request:
> info = new OpenLayers.Control.WMSGetFeatureInfo({
> ? url: 'dir/smms/wms.php',
> ? title: 'Identify features by clicking',
> ? queryVisible: true,
> ? eventListeners: {
> ? getfeatureinfo: function(event) {
> ? map.addPopup(new OpenLayers.Popup.FramedCloud(
> ? "myagri",
> ? map.getLonLatFromPixel(event.xy),
> ? null,
> ? event.text,
> ? null,
> ? true
> ? ));
> ? }
> ? }
> ? });
> ? map.addControl(info);
> ? info.activate();
> And it works fine, I get my info back as I need it, but I have to send some
> extra parameters with getfeatureinfo request for example ''REPORT":"YES" but
> I don't know how to do it. Any help will be appreciated, and if everyone can
> suggest me a better way to do the features request that would be great.
Add
vendorParams: {
"REPORT": "YES"
}
in the options passed to the control.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From hagen1113 at yahoo.com Fri Aug 14 13:02:35 2009
From: hagen1113 at yahoo.com (Raul David Orozco)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Set map initial center and zoom
Message-ID: <971791.8289.qm@web51404.mail.re2.yahoo.com>
I'm here again with mi newbie questions. I've been dealing with this issue for a long time and I can't fix it no matter how hard I try.
I need to make OL set an initial coordinates and zoom so when I open the browser the map stars in some specific part of the world.
I've done it perfectly with an example doing this:
var options = {
minResolution: "auto",
minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
maxResolution: "auto",
maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90)
};
map = new OpenLayers.Map( 'map' , options);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(-73, 3), 3);
And it works just the way I want, but when I do this with my map:
var options = {
minResolution: "auto",
minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
maxResolution: "auto",
maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90)
};
var map = new OpenLayers.Map( 'map' , options);
var request = OpenLayers.Request.GET(
{url: "dir/smms/wms.php?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS",
success: function(response){
var XMLformat = new OpenLayers.Format.XML();
var xml = XMLformat.read(response.responseText);
var CAPformat = new OpenLayers.Format.WMSCapabilities();
var cap = CAPformat.read(xml);
for (var i=0; i
References: <1249584285317-3400100.post@n2.nabble.com>
Message-ID: <1250273345092-3446612.post@n2.nabble.com>
Hi list,
I am still having some difficulties to set up the proxy host in Tomcat. Here
are the steps I followed:
1.- I modified the file: "web.xml" C:\Archivos de programa\Apache Software
Foundation\Tomcat 5.5\conf\web.xml. I uncomented the following lines of
code:
cgiorg.apache.catalina.servlets.CGIServletdebug0cgiPathPrefixWEB-INF/cgi5cgi/cgi-bin/*
2.- I renamed the file servlets-cgi.renametojar to servlets-cgi.jar under
the folder: C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\server\lib
3.- I downloaded the "proxy.cgi" file from Openlayers:
http://trac.openlayers.org/browser/trunk/openlayers/examples/proxy.cgi and
copy the file in a folder called "cgi-bin" that I created under my
directory: "Tomcat 5.5\webapps\MapFish-1.1\client\cgi-bin\proxy.cgi"
4.- In the proxy.cgi file I included my machine in the allowed hosts:
allowedHosts = ['demo.mapfish.org', 'localhost:5000', 'localhost',
'127.0.0.1'] and I also added this line:
#!c:/python25/python.exe -u (I already had installed python in my PC)
5.- I included this piece of code in my map:
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
6.- I restarted my Tomcat.
I do not see the openlayers.org website when I typed:
http://127.0.0.1:8080/MapFish-1.1/client/cgi-bin/proxy.cgi, I got the 404
error.
Does anyone knows what I missing?
Thanks again Eric and Michogar!
Juan
Eric Lemoine-2-2 wrote:
>
> On Thursday, August 6, 2009, Juan Ar?valo wrote:
>>
>> Hi all,
>>
>> I am making some progress setting up a WFS-T, it seems that my code works
>> since I don??t get any error, but the layer doesn't display in the map. I
>> have read that this problem can be solved by setting the Proxy Host,
>> however
>> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and
>> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for
>> Apache
>> but not for Tomcat)
>>
>> Does anyone have any ideas on how to solve it?
>
> Hi. If your Tomcat instance serves both the HTML page and the WFS then
> you don't need a proxy.
>
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3446612.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From john.c.cartwright at comcast.net Fri Aug 14 16:50:56 2009
From: john.c.cartwright at comcast.net (John Cartwright)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer
In-Reply-To:
References: <4A84A257.70301@comcast.net>
Message-ID: <4A85CE30.8020600@comcast.net>
Eric Lemoine wrote:
> On Friday, August 14, 2009, John Cartwright
> wrote:
>
>> Hello All,
>>
>> I have OpenLayers.Layer.Vector layer on which I've defined the
>> "beforefeatureadded" and "beforefeaturesadded" events, e.g.
>>
>> vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded":
>> report});
>>
>> Then I'm adding features to this layer using the
>> OpenLayersControlDrawFeature control. Problem is that the above events
>> don't seem to be firing as I add additional features to the layer. The
>> "featureadded" event fires, but not the "beforefeatureadded".
>>
>> This is version 2.8. Can someone please point out what I'm doing wrong
>> here?
>>
>
> Hi.
>
> this is weird. Can you reproduce that in a minimal example with just a
> vector layer and a draw feature control?
>
Sorry Eric, this was my fault. I was inadvertently redefining the
handler function later in the code.
--john
From mike at spatialit.com Fri Aug 14 17:06:20 2009
From: mike at spatialit.com (Michael Anderson)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] programmatically select feature to modify -
worked in 2.7 but doesn't in 2.8
Message-ID:
Skipped content of type multipart/alternative-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/4ff39ff7/testSelect.html
From john.c.cartwright at comcast.net Fri Aug 14 17:26:42 2009
From: john.c.cartwright at comcast.net (John Cartwright)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added
Message-ID: <4A85D692.8010900@comcast.net>
Hello All,
I'm using OL 2.8 and trying to implement the behavior where the user can
digitize points, lines, or polygons, but only the last created feature
will be kept and displayed. I've attempted this via a handler on the
Layer's "beforefeatureadded" event like:
function clearPreviousFeatures(evt) {
dojo.forEach(vectorLayer.features, function(f) {
if (f.id != evt.feature.id) {
vectorLayer.removeFeatures([f], {silent:true});
}
});
vectorLayer.redraw();
}
However, I find that the previous drawn features remain until the
DrawFeature control is changed. Also as soon as the second feature is
added, the code above complains that "f is undefined". Finally, any
features added subsequent to the first do not display in the style
defined for the layer.
I feel like this should be a simple task and that I'm missing something
fundamental here. Can someone show me what's wrong or suggest a better
strategy for accomplishing this goal?
Thanks!
--john
From jmcgrath at nippour.ca Fri Aug 14 17:27:14 2009
From: jmcgrath at nippour.ca (jmcgrath@nippour.ca)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 37
Message-ID: <20090814212714.19349.qmail@plesk.nippour.ca>
Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t.
Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence.
Bonne journ?e
From n.e.kendall at gmail.com Sat Aug 15 00:33:33 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Anyway to set minimum bounding box?
Message-ID: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com>
Hi All,
I'm happily using map.getCenter in a conditional statement
if( ! map.getCenter() ){
sites.events.register('loadend', sites,
function(){map.zoomToExtent(sites.getDataExtent())});
map.setCenter(null, null);
};
which when my layer is loaded centers on the geometry in the map. This works
great (thanks again, Jan!). The issue I have is when a single POI is loaded,
the map zooms in all the way and I get the "Mose OSM coming soon" tiles
which is not aesthetically pleasing.
I'm going to switch over to a NASA Landsatt, or perhaps an image layer as
the base, but I still think this will be an issue. Is there anyway to
constrain this, or to specify a minimum bounding box or zoom level to
prevent this from happening? The alternative would be to just set the
function on one of my static GML files, but I like this feature. Any
suggestions on how to approach this?
--
Nicholas Efremov-Kendall
Fulbright Student 2009-2010, Ukraine
nefremov@artsci.wustl.edu
c/o Halyna Yerko
Balzaka 92a, Kv 27
02232
Kyiv, Ukraine
(mob) +380963576524
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/dd9e45f4/attachment.html
From eric.lemoine at camptocamp.com Sat Aug 15 03:26:02 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] limiting a Vector layer to the last feature
added
In-Reply-To: <4A85D692.8010900@comcast.net>
References: <4A85D692.8010900@comcast.net>
Message-ID:
On Friday, August 14, 2009, John Cartwright
wrote:
> Hello All,
>
> I'm using OL 2.8 and trying to implement the behavior where the user can
> digitize points, lines, or polygons, but only the last created feature
> will be kept and displayed. ?I've attempted this via a handler on the
> Layer's "beforefeatureadded" event like:
>
> function clearPreviousFeatures(evt) {
> ? ?dojo.forEach(vectorLayer.features, function(f) {
> ? ? ? if (http://f.id != http://evt.feature.id) {
> ? ? ? ? ?vectorLayer.removeFeatures([f], {silent:true});
> ? ? ? }
> ? ?});
> ? ?vectorLayer.redraw();
removing objects within a dojo.forEach loop may not be safe.
why don't you have you beforefeatureadded listener destroy all
features (with layer.destroyFeature)?
Cheers,
> }
>
>
> However, ?I find that the previous drawn features remain until the
> DrawFeature control is changed. ?Also as soon as the second feature is
> added, the code above complains that "f is undefined". ?Finally, any
> features added subsequent to the first do not display in the style
> defined for the layer.
>
> I feel like this should be a simple task and that I'm missing something
> fundamental here. ?Can someone show me what's wrong or suggest a better
> strategy for accomplishing this goal?
>
> Thanks!
>
> --john
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From Jeremy.Husmann at critchlow.co.nz Sat Aug 15 04:15:42 2009
From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Vector file as base map
Message-ID: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
Hello everyone,
Just a quick question.
Im wanting to stand up a basic webpage using standard OpenLayers, but I
want to be displaying a default KML or GML. But without any base map
underneath - i.e. the vector file to be the base map. Is this possible?
And if so how would you recommend starting this?
Cheers,
Jeremy
JEREMY HUSMANN
SOFTWARE ENGINEER
Jeremy.Husmann@critchlow.co.nz
CRITCHLOW LTD
LEVEL 2, 22 THE TERRACE, PO BOX 4103
WELLINGTON, NEW ZEALAND
FREE PHONE: 0800 627 746
DIRECT DIAL: +64 4 910 6208
TEL: +64 4 472 8244
FAX: +64 4 472 6695
KNOW WHERE | WWW.CRITCHLOW.CO.NZ
WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
This email transmission (including any accompanying attachments)
contains confidential information, which may be subject to legal
privilege intended for the named addressee. If any other reader is not
the intended recipient, you are hereby notified that any use,
dissemination, distribution or reproduction of this email is prohibited.
If you have received this email in error please contact us immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/536adce8/attachment.html
From jansen at terrestris.de Sat Aug 15 04:35:51 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Vector file as base map
In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
Message-ID: <4A867367.2040102@terrestris.de>
Hi Jeremy,
simply pass in
isBaseLayer: true
as a part of the options-Object when constructing your vector layer.
Regards,
Marc
Jeremy Husmann schrieb:
>
> Hello everyone,
>
> Just a quick question.
>
> Im wanting to stand up a basic webpage using standard OpenLayers, but
> I want to be displaying a default KML or GML. But without any base map
> underneath ? i.e. the vector file to be the base map. Is this
> possible? And if so how would you recommend starting this?
>
> Cheers,
>
> Jeremy
>
> *JEREMY HUSMANN***
>
> SOFTWARE ENGINEER
>
> Jeremy.Husmann@critchlow.co.nz
>
> * *
>
> *CRITCHLOW LTD***
>
> LEVEL 2, 22 THE TERRACE, PO BOX 4103
>
> WELLINGTON, NEW ZEALAND
>
> FREE PHONE: 0800 627 746
>
> DIRECT DIAL: +64 4 910 6208
>
> TEL: +64 4 472 8244
>
> FAX: +64 4 472 6695
>
> _ _
>
> *KNOW WHERE** | WWW.CRITCHLOW.CO.NZ
> <../../../../Ian/Application%20Data/Microsoft/Signatures/WWW.CRITCHLOW.CO.NZ>*
>
> * *
>
> WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
>
> This email transmission (including any accompanying attachments)
> contains confidential information, which may be subject to legal
> privilege intended for the named addressee. If any other reader is not
> the intended recipient, you are hereby notified that any use,
>
> dissemination, distribution or reproduction of this email is
> prohibited. If you have received this email in error please contact us
> immediately.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From jansen at terrestris.de Sat Aug 15 04:37:48 2009
From: jansen at terrestris.de (Marc Jansen)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Anyway to set minimum bounding box?
In-Reply-To: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com>
References: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com>
Message-ID: <4A8673DC.4050108@terrestris.de>
Hi Nicholas,
have you set the minExtent and maxExtent properties on the map-Object?
Regards,
Marc
Nicholas Efremov-Kendall schrieb:
> Hi All,
>
> I'm happily using map.getCenter in a conditional statement
>
> if( ! map.getCenter() ){
> sites.events.register('loadend', sites,
> function(){map.zoomToExtent(sites.getDataExtent())});
> map.setCenter(null, null);
> };
>
> which when my layer is loaded centers on the geometry in the map. This
> works great (thanks again, Jan!). The issue I have is when a single
> POI is loaded, the map zooms in all the way and I get the "Mose OSM
> coming soon" tiles which is not aesthetically pleasing.
>
> I'm going to switch over to a NASA Landsatt, or perhaps an image layer
> as the base, but I still think this will be an issue. Is there anyway
> to constrain this, or to specify a minimum bounding box or zoom level
> to prevent this from happening? The alternative would be to just set
> the function on one of my static GML files, but I like this feature.
> Any suggestions on how to approach this?
>
>
>
> --
> Nicholas Efremov-Kendall
> Fulbright Student 2009-2010, Ukraine
> nefremov@artsci.wustl.edu
> c/o Halyna Yerko
> Balzaka 92a, Kv 27
> 02232
> Kyiv, Ukraine
> (mob) +380963576524
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From bthoen at gisnet.com Sat Aug 15 07:59:47 2009
From: bthoen at gisnet.com (Bill Thoen)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with
OL/MapServer?
Message-ID: <4A86A333.8090701@gisnet.com>
Greetings All,
What's the best way to create legends in an OpenLayers interface over
MapServer? Is there a way to use the MS HTML legends from a mapfile, or
do I have to start with GetLegendGraphic calls anyway? What I'd like is
a Legend / Layer Control from which I could show / hide layers and see
their current styles -- something like the type 3 legends described in
the MS docs here:
http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend.
But these templates seem to be usable only with MapServer; OpenLayers
doesn't appear to read a mapfile to that level.
In the long run, however, what I really want is a Layer Control; one
that allows the user to change layer order, turn layers on and off,
change their styles, mark a layer as selectable and/or editable,and
group layers so that the groups can be moved up or down, made visible or
hidden, etc. as a group. That, I suppose, is a job for JavaScript or
something similar, which I can do if that's the best approach, but if
there's something ready to use out there already, I'd rather not
re-invent it.
There always seems to be so many choices when you build your own that
sometimes I hardly know where to start!
Thanks,
- Bill Thoen
From jmcgrath at nippour.ca Sat Aug 15 08:01:11 2009
From: jmcgrath at nippour.ca (jmcgrath@nippour.ca)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 38
Message-ID: <20090815120111.1795.qmail@plesk.nippour.ca>
Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t.
Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence.
Bonne journ?e
From eric.lemoine at camptocamp.com Sat Aug 15 08:59:59 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Vector file as base map
In-Reply-To: <4A867367.2040102@terrestris.de>
References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
<4A867367.2040102@terrestris.de>
Message-ID:
On Saturday, August 15, 2009, Marc Jansen wrote:
> Hi Jeremy,
>
> simply pass in
>
> isBaseLayer: true
if you have OL 2.8 you can also use allOverlays true in the map options.
Cheers,
>
> as a part of the options-Object when constructing your vector layer.
>
> Regards,
> Marc
>
>
> Jeremy Husmann schrieb:
>>
>> Hello everyone,
>>
>> Just a quick question.
>>
>> Im wanting to stand up a basic webpage using standard OpenLayers, but
>> I want to be displaying a default KML or GML. But without any base map
>> underneath ? i.e. the vector file to be the base map. Is this
>> possible? And if so how would you recommend starting this?
>>
>> Cheers,
>>
>> Jeremy
>>
>> *JEREMY HUSMANN***
>>
>> SOFTWARE ENGINEER
>>
>> Jeremy.Husmann@critchlow.co.nz
>>
>> * *
>>
>> *CRITCHLOW LTD***
>>
>> LEVEL 2, 22 THE TERRACE, PO BOX 4103
>>
>> WELLINGTON, NEW ZEALAND
>>
>> FREE PHONE: 0800 627 746
>>
>> DIRECT DIAL: +64 4 910 6208
>>
>> TEL: +64 4 472 8244
>>
>> FAX: +64 4 472 6695
>>
>> _ _
>>
>> *KNOW WHERE** | http://WWW.CRITCHLOW.CO.NZ
>> <../../../../Ian/Application%20Data/Microsoft/Signatures/http://WWW.CRITCHLOW.CO.NZ>*
>>
>> * *
>>
>> WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
>>
>> This email transmission (including any accompanying attachments)
>> contains confidential information, which may be subject to legal
>> privilege intended for the named addressee. If any other reader is not
>> the intended recipient, you are hereby notified that any use,
>>
>> dissemination, distribution or reproduction of this email is
>> prohibited. If you have received this email in error please contact us
>> immediately.
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From eric.lemoine at camptocamp.com Sat Aug 15 09:03:52 2009
From: eric.lemoine at camptocamp.com (Eric Lemoine)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with
OL/MapServer?
In-Reply-To: <4A86A333.8090701@gisnet.com>
References: <4A86A333.8090701@gisnet.com>
Message-ID:
On Saturday, August 15, 2009, Bill Thoen wrote:
> Greetings All,
>
> What's the best way to create legends in an OpenLayers interface over
> MapServer? Is there a way to use the MS HTML legends from a mapfile, or
> do I have to start with GetLegendGraphic calls anyway? What I'd like is
> a Legend / Layer Control from which I could show / hide layers and see
> their current styles -- something like the type 3 legends described in
> the MS docs here:
> http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend.
> But these templates seem to be usable only with MapServer; OpenLayers
> doesn't appear to read a mapfile to that level.
>
> In the long run, however, what I really want is a Layer Control; one
> that allows the user to change layer order, turn layers on and off,
> change their styles, mark a layer as selectable and/or ?editable,and
> group layers so that the groups can be moved up or down, made visible or
> hidden, etc. as a group. That, I suppose, is a job for JavaScript or
> something similar, which I can do if that's the best approach, but if
> there's something ready to use out there already, I'd rather not
> re-invent it.
>
> There always seems to be so many choices when you build your own that
> sometimes I hardly know where to start!
Hi.
what you're asking is beyond the scope of OpenLayers. I'd recommend
you look at GeoExt (www.geoext.org), which features a layer tree and a
legend panel (based on GetLegendGraphic for WMS layers).
Hope this helps,
>
>
> Thanks,
> - Bill Thoen
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
From richard.greenwood at gmail.com Sat Aug 15 09:04:25 2009
From: richard.greenwood at gmail.com (Richard Greenwood)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with
OL/MapServer?
In-Reply-To: <4A86A333.8090701@gisnet.com>
References: <4A86A333.8090701@gisnet.com>
Message-ID:
I've been using dlegend from the Minnesota DNR. It is based on the
Yahoo YUI. Here's an example:
www2.tetonwyo.org/mapserver/map.php
You can define the legend in the map file's metadata.
Rich
On Sat, Aug 15, 2009 at 5:59 AM, Bill Thoen wrote:
> Greetings All,
>
> What's the best way to create legends in an OpenLayers interface over
> MapServer? Is there a way to use the MS HTML legends from a mapfile, or
> do I have to start with GetLegendGraphic calls anyway? What I'd like is
> a Legend / Layer Control from which I could show / hide layers and see
> their current styles -- something like the type 3 legends described in
> the MS docs here:
> http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend.
> But these templates seem to be usable only with MapServer; OpenLayers
> doesn't appear to read a mapfile to that level.
>
> In the long run, however, what I really want is a Layer Control; one
> that allows the user to change layer order, turn layers on and off,
> change their styles, mark a layer as selectable and/or ?editable,and
> group layers so that the groups can be moved up or down, made visible or
> hidden, etc. as a group. That, I suppose, is a job for JavaScript or
> something similar, which I can do if that's the best approach, but if
> there's something ready to use out there already, I'd rather not
> re-invent it.
>
> There always seems to be so many choices when you build your own that
> sometimes I hardly know where to start!
>
>
> Thanks,
> - Bill Thoen
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Richard Greenwood
richard.greenwood@gmail.com
www.greenwoodmap.com
From jmcgrath at nippour.ca Sat Aug 15 12:00:12 2009
From: jmcgrath at nippour.ca (jmcgrath@nippour.ca)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 39
Message-ID: <20090815160012.9072.qmail@plesk.nippour.ca>
Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t.
Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence.
Bonne journ?e
From john.c.cartwright at comcast.net Sat Aug 15 12:28:47 2009
From: john.c.cartwright at comcast.net (John Cartwright)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] limiting a Vector layer to the last feature
added
In-Reply-To:
References: <4A85D692.8010900@comcast.net>
Message-ID: <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net>
Thanks for your suggestion Eric. That was the first thing I tried,
but it doesn't clear the map, even with an explicit redraw()
vectorLayer.events.on({
"featuremodified": mapUpdated,
"beforefeatureadded": clearPreviousFeatures,
"featureadded": mapUpdated
});
function clearPreviousFeatures(evt) {
vectorLayer.destroyFeatures();
vectorLayer.redraw();
}
function mapUpdated(evt) {
console.log('Vector layer has '+vectorLayer.features.length+'
features');
dojo.publish('mapUpdated',[evt.feature.geometry]);
}
Setting it up this way also seems to clear the newly added feature as
well - when the featureadded handler runs, it reports no features in
the layer.
Is this what you had in mind?
I really appreciate your help with this.
--john
On Aug 15, 2009, at 1:26 AM, Eric Lemoine wrote:
> On Friday, August 14, 2009, John Cartwright
> wrote:
>> Hello All,
>>
>> I'm using OL 2.8 and trying to implement the behavior where the
>> user can
>> digitize points, lines, or polygons, but only the last created
>> feature
>> will be kept and displayed. I've attempted this via a handler on the
>> Layer's "beforefeatureadded" event like:
>>
>> function clearPreviousFeatures(evt) {
>> dojo.forEach(vectorLayer.features, function(f) {
>> if (http://f.id != http://evt.feature.id) {
>> vectorLayer.removeFeatures([f], {silent:true});
>> }
>> });
>> vectorLayer.redraw();
>
> removing objects within a dojo.forEach loop may not be safe.
>
> why don't you have you beforefeatureadded listener destroy all
> features (with layer.destroyFeature)?
>
> Cheers,
>
>
>> }
>>
>>
>> However, I find that the previous drawn features remain until the
>> DrawFeature control is changed. Also as soon as the second feature
>> is
>> added, the code above complains that "f is undefined". Finally, any
>> features added subsequent to the first do not display in the style
>> defined for the layer.
>>
>> I feel like this should be a simple task and that I'm missing
>> something
>> fundamental here. Can someone show me what's wrong or suggest a
>> better
>> strategy for accomplishing this goal?
>>
>> Thanks!
>>
>> --john
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine@camptocamp.com
> http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/d6f8eb29/attachment.html
From crschmidt at metacarta.com Sat Aug 15 17:11:05 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Vector file as base map
In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz>
Message-ID: <20090815211101.GA26464@metacarta.com>
On Sat, Aug 15, 2009 at 08:15:42PM +1200, Jeremy Husmann wrote:
> Hello everyone,
>
>
>
> Just a quick question.
>
>
>
> Im wanting to stand up a basic webpage using standard OpenLayers, but I
> want to be displaying a default KML or GML. But without any base map
> underneath - i.e. the vector file to be the base map. Is this possible?
> And if so how would you recommend starting this?
Yes.
Just add an isBaseLayer: true option to the layer constructor.
-- Chris
>
>
> Cheers,
>
> Jeremy
>
>
>
> JEREMY HUSMANN
>
> SOFTWARE ENGINEER
>
> Jeremy.Husmann@critchlow.co.nz
>
>
>
> CRITCHLOW LTD
>
> LEVEL 2, 22 THE TERRACE, PO BOX 4103
>
> WELLINGTON, NEW ZEALAND
>
> FREE PHONE: 0800 627 746
>
> DIRECT DIAL: +64 4 910 6208
>
> TEL: +64 4 472 8244
>
> FAX: +64 4 472 6695
>
>
>
> KNOW WHERE | WWW.CRITCHLOW.CO.NZ
>
>
>
> WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
>
> This email transmission (including any accompanying attachments)
> contains confidential information, which may be subject to legal
> privilege intended for the named addressee. If any other reader is not
> the intended recipient, you are hereby notified that any use,
>
> dissemination, distribution or reproduction of this email is prohibited.
> If you have received this email in error please contact us immediately.
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
From n.e.kendall at gmail.com Sat Aug 15 17:15:26 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Anyway to set minimum bounding box?
In-Reply-To: <4A8673DC.4050108@terrestris.de>
References: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com>
<4A8673DC.4050108@terrestris.de>
Message-ID: <33fd44f90908151415g7f62ce3cn4dce3cfaa1f2df43@mail.gmail.com>
No, I haven't. Does anyone have a good rule of thumb for scaling these
properties, or is it just sort of a feel it out kind of thing? Thanks, Marc.
On Sat, Aug 15, 2009 at 11:37 AM, Marc Jansen wrote:
> Hi Nicholas,
>
> have you set the minExtent and maxExtent properties on the map-Object?
>
> Regards,
>
> Marc
>
> Nicholas Efremov-Kendall schrieb:
>
>> Hi All,
>>
>> I'm happily using map.getCenter in a conditional statement
>> if( ! map.getCenter() ){
>> sites.events.register('loadend', sites,
>> function(){map.zoomToExtent(sites.getDataExtent())});
>> map.setCenter(null, null);
>> };
>>
>> which when my layer is loaded centers on the geometry in the map. This
>> works great (thanks again, Jan!). The issue I have is when a single POI is
>> loaded, the map zooms in all the way and I get the "Mose OSM coming soon"
>> tiles which is not aesthetically pleasing.
>> I'm going to switch over to a NASA Landsatt, or perhaps an image layer as
>> the base, but I still think this will be an issue. Is there anyway to
>> constrain this, or to specify a minimum bounding box or zoom level to
>> prevent this from happening? The alternative would be to just set the
>> function on one of my static GML files, but I like this feature. Any
>> suggestions on how to approach this?
>>
>>
>>
>> --
>> Nicholas Efremov-Kendall
>> Fulbright Student 2009-2010, Ukraine
>> nefremov@artsci.wustl.edu
>> c/o Halyna Yerko
>> Balzaka 92a, Kv 27
>> 02232
>> Kyiv, Ukraine
>> (mob) +380963576524
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users@openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
--
Nicholas Efremov-Kendall
Fulbright Student 2009-2010, Ukraine
nefremov@artsci.wustl.edu
c/o Halyna Yerko
Balzaka 92a, Kv 27
02232
Kyiv, Ukraine
(mob) +380963576524
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090816/a686f4b3/attachment.html
From xiaying4415139 at 163.com Sun Aug 16 01:33:36 2009
From: xiaying4415139 at 163.com (shane_china)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] about Navigation and Box Control
In-Reply-To: <133009.25562.qm@web15104.mail.cnb.yahoo.com>
References: <133009.25562.qm@web15104.mail.cnb.yahoo.com>
Message-ID: <1250400816745-3452557.post@n2.nabble.com>
Use ZoomBox control is so easy, just like the common control.
var ctl = new OpenLayers.Control.ZoomBox();
map.addControl(ctl);
Please notice that, there are controls who exclude each other, navigation
and zoombox are one of the example. So you should to use Button group for
just active one of these exclusive controls.
That means active navigation, deactive zoombox, active zoombox deactive
navigation.
If you are new openlayers user and want more help, you can add my QQ
642106069, be fine.
?? ? wrote:
>
> Hi:
> ????? I have a problem,i can't use Navigation
> Control(OpenLayers.Control.Navigation()) when i have used Box Control like
> this :
> ??? var control = new OpenLayers.Control();
> ??????????????? OpenLayers.Util.extend(control, {
> ??????????????????? draw: function () {
> ??????????????????????? // this Handler.Box will intercept the
> shift-mousedown
> ??????????????????????? // before Control.MouseDefault gets to see it
> ??????????????????????? this.box = new OpenLayers.Handler.Box( control,
> ??????????????????????????? {"done": this.notice},
> ??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL});
> ??????????????????????? this.box.activate();
> ??????????????????? },
>
> ??????????????????? notice: function (bounds) {
> ??????????????????????? var ll = map.getLonLatFromPixel(new
> OpenLayers.Pixel(bounds.left, bounds.bottom));
> ??????????????????????? var ur = map.getLonLatFromPixel(new
> OpenLayers.Pixel(bounds.right, bounds.top));
> ??????????????????????? var rowlength =
> document.all("table1").rows.length;
> ??????????????????????? for(var i=1; i ??????????????????????? ???
> document.all("table1").rows[i].cells[1].bgColor = "#ffffff";
> ??????????????????????? ??? var x =
> document.all("table1").rows[i].cells[4].innerText;
> ??????????????????????? ??? var y =
> document.all("table1").rows[i].cells[5].innerText;
> ??????????????????????? ???
> if(x>ll.lon.toFixed(4)&&xll.lat.toFixed(4)&&y ??????????????????????? ??? //??? alert("sucess");
> ??????????????????????? ??? ???
> document.all("table1").rows[i].cells[1].bgColor = "#00FFFF";
> ??????????????????????? ??? }
> ??????????????????????? }
> ??????????????????????? alert(ll.lon.toFixed(4) + ", " +
> ????????????????????????????? ll.lat.toFixed(4) + ", " +
> ????????????????????????????? ur.lon.toFixed(4) + ", " +
> ????????????????????????????? ur.lat.toFixed(4));
> ??????????????????? }
> ??????????????? });
> ? i want them work together,how can i do ? thanks
>
>
>
>
> ___________________________________________________________
> ?????????????????
> http://card.mail.cn.yahoo.com/
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/about-Navigation-and-Box-Control-tp3435061p3452557.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
From jmcgrath at nippour.ca Sun Aug 16 01:33:43 2009
From: jmcgrath at nippour.ca (jmcgrath@nippour.ca)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 40
Message-ID: <20090816053343.20192.qmail@plesk.nippour.ca>
Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t.
Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence.
Bonne journ?e
From Jeremy.Husmann at critchlow.co.nz Sun Aug 16 03:44:24 2009
From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Vector file as base map
In-Reply-To: <4A867367.2040102@terrestris.de>
Message-ID: <9436AA4D332D4F41A2C82CD50DB759F772268D@caexch01.ca1.critchlow.co.nz>
Great, found that out about 20 minutes after sending the email.
Thank you for your help Marc and Eric!
Cheers guys,
Jeremy
JEREMY HUSMANN
SOFTWARE ENGINEER
Jeremy.Husmann@critchlow.co.nz
CRITCHLOW LTD
LEVEL 2, 22 THE TERRACE, PO BOX 4103
WELLINGTON, NEW ZEALAND
FREE PHONE: 0800 627 746
DIRECT DIAL: +64 4 910 6208
TEL: +64 4 472 8244
FAX: +64 4 472 6695
KNOW WHERE | WWW.CRITCHLOW.CO.NZ
WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
This email transmission (including any accompanying attachments)
contains confidential information, which may be subject to legal
privilege intended for the named addressee. If any other reader is not
the intended recipient, you are hereby notified that any use,
dissemination, distribution or reproduction of this email is prohibited.
If you have received this email in error please contact us immediately.
-----Original Message-----
From: Marc Jansen [mailto:jansen@terrestris.de]
Sent: Saturday, August 15, 2009 8:36 PM
To: Jeremy Husmann
Cc: users@openlayers.org
Subject: Re: [OpenLayers-Users] Vector file as base map
Hi Jeremy,
simply pass in
isBaseLayer: true
as a part of the options-Object when constructing your vector layer.
Regards,
Marc
Jeremy Husmann schrieb:
>
> Hello everyone,
>
> Just a quick question.
>
> Im wanting to stand up a basic webpage using standard OpenLayers, but
> I want to be displaying a default KML or GML. But without any base map
> underneath - i.e. the vector file to be the base map. Is this
> possible? And if so how would you recommend starting this?
>
> Cheers,
>
> Jeremy
>
> *JEREMY HUSMANN***
>
> SOFTWARE ENGINEER
>
> Jeremy.Husmann@critchlow.co.nz
>
> * *
>
> *CRITCHLOW LTD***
>
> LEVEL 2, 22 THE TERRACE, PO BOX 4103
>
> WELLINGTON, NEW ZEALAND
>
> FREE PHONE: 0800 627 746
>
> DIRECT DIAL: +64 4 910 6208
>
> TEL: +64 4 472 8244
>
> FAX: +64 4 472 6695
>
> _ _
>
> *KNOW WHERE** | WWW.CRITCHLOW.CO.NZ
>
<../../../../Ian/Application%20Data/Microsoft/Signatures/WWW.CRITCHLOW.C
O.NZ>*
>
> * *
>
> WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL
>
> This email transmission (including any accompanying attachments)
> contains confidential information, which may be subject to legal
> privilege intended for the named addressee. If any other reader is not
> the intended recipient, you are hereby notified that any use,
>
> dissemination, distribution or reproduction of this email is
> prohibited. If you have received this email in error please contact us
> immediately.
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
From Gerhard.Duennebeil at chello.at Sun Aug 16 05:39:39 2009
From: Gerhard.Duennebeil at chello.at (=?ISO-8859-1?Q?Gerhard_D=FCnnebeil?=)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Problems with IE8 and GeoJSON
In-Reply-To: <4A8256C6.7040804@chello.at>
References: <4A8256C6.7040804@chello.at>
Message-ID: <4A87D3DB.3010208@chello.at>
ok, finally found it myself.
When working with JSON the Internet Explorer is more critical than firefox.
Within the array brackets [] for the "features" array my JSON contained
an extra "," at the end.
Firefox ignores it, IE obviously does not.
Fixing this problem made my code work
Best regards
Gerhard
Gerhard D?nnebeil wrote:
> Hi everybody.
>
> Not sure this problem already got discussed, if yes.....please give me a
> pointer to it. Otherwise .....
>
>
>
> I try to display a vector layer using a fixed strategy and GeoJSON.
> Things work fine under Firefox.
>
> When I test things with IE8, things fail. I run IE8 in default mode, no
> special headers or anything set on the web page that holds the map or
> elsewhere.
>
> I digged deeper into it and found the following strange behaviour:
> When the Layer is about to be drawn, data is fetched from the net and
> converted from JSON to java script. This happens in the read method
> (GEOjson.js/Line 64, see code excerpt below)
>
> A bit below (line 69) the conversion is done into the variable "obj".
> When you look at the "obj" variable at this point it holds an array
> named features *but* the feature array has *no* length property.
> Otherwise the array is correct with respect to the input data.
>
> In line 108 this feature array is iterated with a reference to the
> length property. When IE8 interprets this statement the feature array
> suddenly *has* a length property but it is wrong (too big, 3 instead of 2).
> As a follow-up error this causes the loop to break via the catch block
> when features[2] is accessed and gives back an empty result instead of
> the expected.
>
> Is this a known problem?
> How to work around it?
>
> thanks for any help and
> best regards
> Gerhard
>
> ------------------------------------------
> Appendix 1, the code mentioned above)
>
> read: function(json, type, filter) {
> type = (type) ? type : "FeatureCollection";
> var results = null;
> var obj = null;
> if (typeof json == "string") {
> line 69: obj = OpenLayers.Format.JSON.prototype.read.apply(this,
> [json,
> filter]);
> } else {
> obj = json;
> }
> if(!obj) {
> OpenLayers.Console.error("Bad JSON: " + json);
> } else if(typeof(obj.type) != "string") {
> OpenLayers.Console.error("Bad GeoJSON - no type: " + json);
> } else if(this.isValidType(obj, type)) {
> switch(type) {
> case "Geometry":
> try {
> results = this.parseGeometry(obj);
> } catch(err) {
> OpenLayers.Console.error(err);
> }
> break;
> case "Feature":
> try {
> results = this.parseFeature(obj);
> results.type = "Feature";
> } catch(err) {
> OpenLayers.Console.error(err);
> }
> break;
> case "FeatureCollection":
> // for type FeatureCollection, we allow input to be
> any type
> results = [];
> switch(obj.type) {
> case "Feature":
> try {
> results.push(this.parseFeature(obj));
> } catch(err) {
> results = null;
> OpenLayers.Console.error(err);
> }
> break;
> case "FeatureCollection":
> line 108: for(var i=0,
> len=obj.features.length; i try {
>
> results.push(this.parseFeature(obj.features[i]));
> } catch(err) {
> results = null;
> OpenLayers.Console.error(err);
> }
> }
> break;
> default:
> try {
> var geom = this.parseGeometry(obj);
> results.push(new
> OpenLayers.Feature.Vector(geom));
> } catch(err) {
> results = null;
> OpenLayers.Console.error(err);
> }
> }
> break;
> }
> }
> return results;
>
> ------------------------------------------------
> Appendix 2, the JSON data
>
> { "type" : "FeatureCollection", "features" : [ { "type" : "Feature"
> ,"geometry": { "type": "Point", "coordinates": [291068,270013] }
> ,"properties": { "img_url": "icons/green_dot.gif" } }, { "type" :
> "Feature" ,"geometry": { "type": "Point", "coordinates": [291069,269967]
> } ,"properties": { "img_url": "icons/red_dot.gif" } }, ] }
>
>
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
From n.e.kendall at gmail.com Sun Aug 16 08:02:43 2009
From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall)
Date: Wed Sep 1 17:17:45 2010
Subject: [OpenLayers-Users] Issues with some popups
Message-ID: <33fd44f90908160502ub5067c4oc83ef33c5e744d53@mail.gmail.com>
Hi all,
I'm having some issues with my code, and I'm not sure where the problem
lies. This code worked at one point, and I've been staring at it for too
long to see the problem. Two firebug errors fire when I click on one of the
POI's "feature.geometry is undefined" and "popup is undefined". Any
suggestions?
var map, layer, selectedFeature, selectControl, selectedFeature, sites;
function onPopupClose(evt) {
selectControl.unselect(selectedFeature);
}
function onFeatureSelect(feature) {
selectedFeature = feature;
popup = new OpenLayers.Popup.FramedCloud("chicken",
feature.geometry.getBounds().getCenterLonLat(),
null,
"