Matthew Pettis | 1 Nov 03:41 2011
Picon

Openlayers.Bounds().transform() not doing transform

I am trying to do a coordinate transform of bounds in Openlayers, and have tried the following, which, for both console.log() statements, gives me the same bounds in both cases (but I expect the second statement to give me bounds in EPGS:4326):

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Bounds Example</title>
        <script src="/OpenLayers-2.10/OpenLayers.js"></script>
        <script type="text/javascript">
            function init(){
                var fromProjection = new OpenLayers.Projection("EPSG:26915");
                var toProjection = new OpenLayers.Projection("EPSG:4326");
                var extent = new OpenLayers.Bounds(189775.379950,4816289.746171,761662.354535,5472414.143295);
                console.log(extent);
                console.log(extent.transform(fromProjection,toProjection));
            }
        </script>
      </head>
    
        <body onload="init()">
        </body>
    
    </html>

In both console.log() statements, I get the following object (c&p from Chrome javascript debugger):

    Class
    bottom: 4816289.746171
    centerLonLat: null
    left: 189775.37995
    right: 761662.354535
    top: 5472414.143295
    __proto__: Object

I read the documentation for proj4js with openlayers here, and it tells me:

OpenLayers integrates with Proj4js if the library is available. This will make using it a bit easier. Having it in the same folder as OpenLayers.js will make it available.

Which I did via a symlink:

    matt <at> xxxxxxxx:/var/www/xxxxx$ ll /var/www/OpenLayers-2.10/
    total 1008
    drwxr-xr-x 13 matt matt   4096 Nov  1 01:49 .
    drwxrwxrwx 30 root root   4096 Nov  1 01:43 ..
    -rw-r--r--  1 matt matt 945828 Sep  9  2010 OpenLayers.js
    ...
    lrwxrwxrwx  1 matt matt     31 Nov  1 01:49 proj4js.js -> /var/www/proj4js/lib/proj4js.js
    ...

Can someone help me diagnose what I'm doing wrong here?

Thanks, Matt

PS -- I've crossposted from stackoverflow, as I don't know which place is getting more activity -- http://stackoverflow.com/questions/7961872/openlayers-bounds-transform-not-doing-transform


--
Do not seek to follow in the footsteps of the wise men of old. Seek what they sought.

- Matsuo Munefusa (”Basho”)
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
bernhard zwischenbrugger | 1 Nov 10:22 2011

Editing Vectors like in Potlatch

Hi all

I have to make a tool that allows to edit Vectors (LineString).

Like in Potlatch it should be possible to

o create vectors
o select vectors
o extend vectors
o move points
o delete points
o add points (between exisitin points)

I have seen all the examples like:
http://openlayers.org/dev/examples/editingtoolbar-outside.html
http://openlayers.org/dev/examples/modify-feature.html
http://openlayers.org/dev/examples/editing-methods.html
..
But it looks like there is no complete vector editor available.

Does somebody know a good starting point for my project?

Bernhard
Bart van den Eijnden | 1 Nov 12:36 2011
Picon

Re: ArcGIS online ToS

I've asked my contacts at ESRI The Netherlands for a clarification and as long as tiles accessed through their API there is no issue.

See also the human-readable version of the ToS which ESRI created recently:

http://help.arcgis.com/en/arcgisonline/e800_summary.pdf

Best regards,
Bart

-- 
Bart van den Eijnden
OSGIS - http://osgis.nl

On Oct 22, 2011, at 2:45 AM, Stephen Mather wrote:

Hi,
      This reminds me of the TOA issues associated with the ESRI FGDB API with respect to single use licensing vs. server, ala Paul Ramsey's post a while back.  It seems like an opportunity to bring ESRI in on the conversation and see what their intent is, and whether there's an opportunity that they are missing with these restrictions (but best to be cautious in the mean time).

Best,
Steve


On Thu, Oct 20, 2011 at 5:45 AM, Bart van den Eijnden (OSGIS) <bartvde-b9n8q0cb+Z0@public.gmane.org> wrote:
Hi,

Bryan McBride posted a bit on Twitter about this, but it seems that ESRI's
ToS [http://www.esri.com/legal/pdfs/e-800-termsofuse.pdf] does not allow
third-party clients to access the web services (however this seems to
differ among services since some are licensed CCA instead).

Section 4, item f of the ToS reads:

f. Provide others with access to Web Services through non-Esri software;

So this probably means that we are validating their terms by some of our
examples, especially:

http://dev.openlayers.org/releases/OpenLayers-2.11/examples/arcgiscache_ags.html

which uses:

http://www.arcgis.com/home/item.html?id=f2498e3d0ff642bfb4b155828351ef0e

However this example does not work at the moment. But we might need to
take some action in this regard.

Best regards,
Bart

_______________________________________________
Users mailing list
Users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
elshae | 1 Nov 15:12 2011
Picon

Re: Map data popups on Google overlays

I use :

.olLayerGoogleCopyright {				
    display: none;
}

Cheers,

elshae

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Openlayers-Users-Map-data-popups-on-Google-overlays-tp5844648p6951807.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Michael Adair | 1 Nov 15:29 2011
Picon

Re: Openlayers.Bounds().transform() not doing transform

Did you include the definition for EPSG:26915?  Otherwise it will try to look it up via a proxy.

Proj4js.defs["EPSG:26915"] = "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"; Mike

On 31/10/2011 10:41 PM, Matthew Pettis wrote:
I am trying to do a coordinate transform of bounds in Openlayers, and have tried the following, which, for both console.log() statements, gives me the same bounds in both cases (but I expect the second statement to give me bounds in EPGS:4326):

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Bounds Example</title>
        <script src="/OpenLayers-2.10/OpenLayers.js"></script>
        <script type="text/javascript">
            function init(){
                var fromProjection = new OpenLayers.Projection("EPSG:26915");
                var toProjection = new OpenLayers.Projection("EPSG:4326");
                var extent = new OpenLayers.Bounds(189775.379950,4816289.746171,761662.354535,5472414.143295);
                console.log(extent);
                console.log(extent.transform(fromProjection,toProjection));
            }
        </script>
      </head>
    
        <body onload="init()">
        </body>
    
    </html>

In both console.log() statements, I get the following object (c&p from Chrome javascript debugger):

    Class
    bottom: 4816289.746171
    centerLonLat: null
    left: 189775.37995
    right: 761662.354535
    top: 5472414.143295
    __proto__: Object

I read the documentation for proj4js with openlayers here, and it tells me:

OpenLayers integrates with Proj4js if the library is available. This will make using it a bit easier. Having it in the same folder as OpenLayers.js will make it available.

Which I did via a symlink:

    matt <at> xxxxxxxx:/var/www/xxxxx$ ll /var/www/OpenLayers-2.10/
    total 1008
    drwxr-xr-x 13 matt matt   4096 Nov  1 01:49 .
    drwxrwxrwx 30 root root   4096 Nov  1 01:43 ..
    -rw-r--r--  1 matt matt 945828 Sep  9  2010 OpenLayers.js
    ...
    lrwxrwxrwx  1 matt matt     31 Nov  1 01:49 proj4js.js -> /var/www/proj4js/lib/proj4js.js
    ...

Can someone help me diagnose what I'm doing wrong here?

Thanks, Matt

PS -- I've crossposted from stackoverflow, as I don't know which place is getting more activity -- http://stackoverflow.com/questions/7961872/openlayers-bounds-transform-not-doing-transform


--
Do not seek to follow in the footsteps of the wise men of old. Seek what they sought.

- Matsuo Munefusa (”Basho”)


_______________________________________________ Users mailing list Users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Matt Pettis | 1 Nov 16:12 2011
Picon

Re: Openlayers.Bounds().transform() not doing transform

Thanks Mike,

I did not originally include the definition, but I have now, as well as
including proj4js.js from its original unzipped directory because I had
issues because it was trying to load other .js files (I thought it was
self-contained).  However, I am getting the same results of having the
object being identical in attribute values before and after the transform
(both in EPSG:26915).  Here is the html code: http://pastebin.com/9PaBwLDx

Additional help is appreciated,

Thanks,
Matt

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Openlayers-Bounds-transform-not-doing-transform-tp6950434p6952012.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Michael Adair | 1 Nov 17:37 2011
Picon

Re: Re: Openlayers.Bounds().transform() not doing transform

In testing your sample code, it looks like you are trying to load the 
code for the UTM projection asynchronously and you aren't waiting for 
the file to be loaded.  You can fix either by using a pre-built version 
of Proj4js ie. use the proj4js-combined.js or proj4js-compressed.js 
files, or by passing a callback to the Proj4js constructor.

Mike

On 01/11/2011 11:12 AM, Matt Pettis wrote:
> Thanks Mike,
>
> I did not originally include the definition, but I have now, as well as
> including proj4js.js from its original unzipped directory because I had
> issues because it was trying to load other .js files (I thought it was
> self-contained).  However, I am getting the same results of having the
> object being identical in attribute values before and after the transform
> (both in EPSG:26915).  Here is the html code: http://pastebin.com/9PaBwLDx
>
> Additional help is appreciated,
>
> Thanks,
> Matt
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Openlayers-Bounds-transform-not-doing-transform-tp6950434p6952012.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@...
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
tvnc1979 | 1 Nov 18:10 2011
Picon

closing popup window after layer redraw

each time my layer is redrawn my popups windows are closed. I would like to 
left them open as long as user want. how could I make this work.

in practice when I open popup window on a feature, window closes in 20 sec when 
layers is refreshed to import new features. I would like that popup window 
stays open till user closes it by clicking on it.
when i remove function "beforefeatureremoved": onMarkerBeforeFeatureRemoved 
popups window can not been removed after layer refresh. it does not react at all

var test = new OpenLayers.Layer.Vector( "TEST", {
            styleMap: testStil,           
            projection: map.displayProjection,
            strategies: [new OpenLayers.Strategy.Fixed
()],				 
                    protocol: new OpenLayers.Protocol.HTTP({

                            url: test source,
                            format: new OpenLayers.Format.Text({
                            extractStyles: false, 
                            extractAttributes: true
                        })
                    })
                });

    window.setInterval(UpdateKmlLayer, 20000, test);

    function UpdateKmlLayer(layer) {

                    layer.loaded = false;
                    layer.refresh({ force: true, params: { 'key': Math.random
()} 
    });

    test.events.on({
                    "featureselected": onFeatureSelect,
                    "featureunselected": onFeatureUnselect,
                    "beforefeatureremoved": onMarkerBeforeFeatureRemoved
                });

    function onFeatureSelect(event) {
                var feature = event.feature;
                var content = '<table class="z">something</table>';

                popup = new OpenLayers.Popup.FramedCloud("chicken", 
                                         feature.geometry.getBounds
().getCenterLonLat(),
                                         new OpenLayers.Size(100,100),
                                         content,
                                         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;
                    popup = null;
                    $("#o").val("");
                }
            }

    function onMarkerBeforeFeatureRemoved(evt){
         if(evt.feature.popup){

             map.removePopup(evt.feature.popup);
             evt.feature.popup.destroy();
             delete evt.feature.popup;
         }

    }
            }        
Matt Pettis | 1 Nov 18:16 2011
Picon

Re: Openlayers.Bounds().transform() not doing transform

I just tried using/loading proj4js-compressed.js, and it worked like a charm,
thank you very much!

Matt

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Openlayers-Bounds-transform-not-doing-transform-tp6950434p6952480.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Robert Buckley | 2 Nov 08:48 2011
Picon

TMS problem with geowebcache

Hi,

I´m trying to implement a tms service through geowebcache (running inside Geoserver2.1.2 on Linux/tomcat6)

The layer in question in fine runnning as a normal WMS geowebcache service as defined below, but the layer doesn´t print.



// gwc/wms service
var GWC_Layer = new OpenLayers.Layer.WMS("GWC Layer", 
"http://maps.zgb.de/geoserver/gwc/service/wms", {
        layers: 'zgb:rrop08_mosaic',
        projection: epsg900913,
        format: 'image/png',
        transparent: true,
        singleTile: true
    }, {'buffer': 0,
        'opacity': 1,
        'isBaseLayer': true,
        visibility: true
    }); 

// GWC TMS Service
var TMS_Layer = new OpenLayers.Layer.TMS(
'TMS_Layer','http://maps.zgb.de/geoserver/gwc/service/tms/',{
serviceVersion: '1.0.0',
layername:'http://maps.zgb.de/geoserver/gwc/service/tms/1.0.0/zgb:rrop08_mosaic <at> ESPG:900913 <at> png',
type:'png',
visibility:true,
isBaseLayer: false,
serverResolutions:[156543.03390625, 78271.516953125, 39135.7584765625, 19567.87923828125, 
9783.939619140625, 4891.9698095703125, 2445.9849047851562, 1222.9924523925781, 611.4962261962891, 305.74811309814453, 
152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 
2.388657133579254, 1.194328566789627, 0.5971642833948135, 0.29858214169740677]
}
);


All I get are 404 errors.

The map is in EPSG:900913 and so is the TileCache, so I´m guessing the gridset is  ok???..but it´s my first time so I can´t say for sure.

any help would be great,

Cheers,

Rob 
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Gmane