Re: [OpenLayers-Users] WFS layer visible in IE6 and IE7, but not in Firefox. Tried to set up proxy. No succes yet.

2009-06-22 Thread sendeman

Hi,

Thanks for your responses (to this thread and also to thread
http://n2.nabble.com/Scalebar-not-visible-td3086564.html). I did understand
that sending more information might be required, that's why I asked. :-)

I tried your suggestions. What struck me as odd is that when I changed
meters to m, the map doesn't get drawn at all. I get the error:

OpenLayers.Number.format is not a function (line 310,
openlayers_scalebar.js)
this.element.title = this.scaleT... + OpenLayers.Number.format(this.scale);

When I comment the scalebar out in the init() function, the map does draw
correctly.

So, more information is —like you said— probably required. I hope the
information below helps to track down the issues I'm having.

Thanks again and next time I'll try to give any information I can find that
might be relevant.

Regards, Martijn Senden.

_
Sample of the WFS request. I took it from the firebug console.
_
?xml version='1.0' encoding=ISO-8859-1 ?
wfs:FeatureCollection
   xmlns:ms=http://mapserver.gis.umn.edu/mapserver;
   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;
   xsi:schemaLocation=http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
 
   http://mapserver.gis.umn.edu/mapserver
http://localhost/geoviewerbin/mapserv.exe
?SERVICE=WFSVERSION=1.0.0REQUEST=DescribeFeatureTypeTYPENAME=SpoortunnelWFSOUTPUTFORMAT
=XMLSCHEMA
  gml:boundedBy
  gml:Box srsName=EPSG:28992
  gml:coordinates83630.646163,446006.688340
84532.015815,448167.273662/gml:coordinates
  /gml:Box
  /gml:boundedBy
gml:featureMember
  ms:SpoortunnelWFS fid=SpoortunnelWFS.0
gml:boundedBy
gml:Box srsName=EPSG:28992
gml:coordinates83630.646163,446006.688340
84532.015815,448167.273662/gml:coordinates
/gml:Box
/gml:boundedBy
ms:msGeometry
gml:Polygon srsName=EPSG:28992
  gml:outerBoundaryIs
gml:LinearRing
  gml:coordinates84142.478815,447382.011200
84147.593250,447371.887716 84152.635940,447361
.728420 84154.564082,447357.773911 84157.606746,447351.533580
84162.505308,447341.304028 84167.331415
,447331.039998 84172.084698,447320.742347 84176.765156,447310.411076
84181.372428,447300.047021 84185
.906219,447289.650744 84190.366526,447279.222569 84191.412015,447276.728803
84194.753002,447268.762981
 84194.887697,447268.426815 84199.065272,447258.272852
84203.303255,447247.752497 84207.466884,447237
.202205 84211.405768,447226.566062 84213.088456,447222.089365
84217.177223,447211.510242 84219.508433
,447205.379011 84221.191122,447200.902314 84223.371864,447194.715475
84227.159978,447184.024624 84230
.872276,447173.307543 84238.069100,447151.795658 84244.961132,447130.184023
84254.724243,447097.589567
 84260.847969,447075.747914 84266.660836,447053.826901
84272.938813,447028.688277 84294.383700,446938
.089521 84301.545087,446906.874940 84308.506556,446875.615165
84315.267820,446844.311477 84321.828603
,446812.965159 84328.188638,446781.577494 84334.347662,446750.149768
84341.763370,446710.810838 84357
.198724,446626.219224 84363.237902,446594.835635 84369.404344,446564.497450
84376.098173,446533.249184
 84383.124929,446502.074095 84390.483814,446470.975730
84398.173989,446439.957628 84406.194580,446409
.023317 84414.544676,446378.176318 84419.930390,446358.942840
84427.404262,446333.035436 84432.229537
,446316.758280 84435.746839,446304.769815 84439.206611,446293.802561
84441.870906,446285.205924 84451
.220527,446255.731467 84459.930485,446229.154742 84471.042481,446195.984832
84491.168678,446136.286808
 84511.614961,446075.640707 84532.015815,446015.129356
84507.951406,446006.688340 84494.882880,446045
.451138 84481.784480,446084.302546 84461.338197,446144.948647
84441.212149,446204.648811 84430.103591
,446237.860977 84421.399951,446264.509315 84417.292666,446277.512869
84414.549537,446286.084181 84411
.750719,446295.064430 84411.131404,446297.064468 84402.427951,446325.720731
84393.432709,446356.474728
 84384.766014,446387.322924 84376.428853,446418.261807
84368.422176,446449.287859 84360.746893,446480
.397548 84353.403876,446511.587336 84339.760852,446573.141920
84326.262913,446634.645566 84319.071953
,446665.783942 84306.927138,446715.246326 84296.115584,446756.828877
84280.329807,446816.804095 84272
.399205,446847.832165 84264.667343,446878.910354 84250.00,446940.231868
84235.762323,447001.599982
 84219.099790,447072.726161 84213.748476,447094.263813
84208.183344,447115.401276 84202.312049,447136
.447914 84196.134043,447157.406545 84189.650518,447178.272691
84182.862825,447199.042184 84175.772651
,447219.710088 84168.381325,447240.272299 84160.690546,447260.724157
84152.701776,447281.061639 84140
.163825,447311.343858 84131.438031,447331.376028 

Re: [OpenLayers-Users] Overlay on Google

2009-06-22 Thread moony

Hi all,

I want to use Google Maps as baselayer and overlay wms, which are delivered
by ArcGIS Server.  
OpenLayers is always using epsg:900913, but ArcGIS Servers uses epsg:
102113 for the google projection.
How can I force OpenLayers to use epsg: 102113 instead of epsg: 900913?
Defining the projection in the options doesn't work.

var options = {
projection: new OpenLayers.Projection(EPSG:102113),
//projection: new OpenLayers.Projection(EPSG:900913),
//displayProjection: new OpenLayers.Projection(EPSG:4326),
units: m,
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
 20037508, 20037508.34)
};
   map = new OpenLayers.Map('map', options);

 var gphy = new OpenLayers.Layer.Google(
Google Physical,
{type: G_HYBRID_MAP, 'sphericalMercator': true}
);

var wms = new OpenLayers.Layer.WMS( Fläche natürlicher Vegetation pro
Einwohner, 

http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Web/MapServer/WMSServer?;,
 
{layers: '0', srs: 'EPSG:102113',format: 'image/png', 
transparent:
'true'},  
{singleTile: true, isBaseLayer: false}
);

map.addLayers([gphy,wms]);
-- 
View this message in context: 
http://n2.nabble.com/Overlay-on-Google-tp2973539p3135908.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] How to convert a coordinate like 5383153.349692758 to 43.468243 ?

2009-06-22 Thread Paul Spencer
Note that transform does not return a new instance of LonLat, it  
modifies the instance that the method was invoked on.

lonLat.transform(source, destination);

if you want to preserve the original, you must clone it first ...

clonedLonLat = lonLat.clone();
clonedLonLat.transform(source, destination)

Note: If you are using the proj4js library with OpenLayers, you should  
be aware that it marks a geometry as transformed and will not  
transform it again unless you unset the flag, so if you want to  
transform from 900913 to 4326 and then back again at some later point,  
you will not get the expected results.

Cheers

Paul

On 21-Jun-09, at 5:54 AM, toni hernández wrote:

 hi,
 I guess you need to transform the coords from 900913 system to 4326,  
 don't you?

 I am not an expert but I think you just need to use the transform  
 function.
 firt get a var called yourcoords (in the example I wrote) with the  
 coordenate you want to transform.

 Then do the transform.. like this.

 newcoords = yourcoords.transform(new OpenLayers.Projection(EPSG: 
 900913),new OpenLayers.Projection(4326))

 900913 and 4326 are defined (I think) in Openlayers. If this is not  
 working then you can try to do the transform with the proj4js api.  
 If you do, read first this. http://trac.osgeo.org/proj4js/wiki/UserGuide

 On Sun, Jun 21, 2009 at 11:35 AM, Jan Martin janmart...@googlemail.com 
  wrote:
 Hi all,
 I have been fiddling with this way too long already, so I ask:

 After changing the Click Event Example a bit I am getting  
 coordinates like this:

 5383153.349692758  1323087.0961396247

 Click Event Example: http://www.openlayers.org/dev/examples/click.html

 However I need them like this:
 43.46824311.880172

 Btw. same format as the coordinates in the data.txt.

 I think All I DID is changing from WMS to OSM Layers?
 How to automatically convert?

 Thanks.




 Please find my code:

 html
 head
 titlemap3/title
 style type=text/css
 #map {width: 90%;
   height: 90%;
   border: 1px solid black;}



 /style

 script src=OpenLayers.js/script
 script src=OpenStreetMap.js/script

   script type=text/javascript
 OpenLayers.Control.Click =  
 OpenLayers.Class(OpenLayers.Control, {



 defaultHandlerOptions: {
 'single': true,
 'double': false,
 'pixelTolerance': 0,
 'stopSingle': false,



 'stopDouble': false
 },

 initialize: function(options) {
 this.handlerOptions = OpenLayers.Util.extend(
 {}, this.defaultHandlerOptions



 );
 OpenLayers.Control.prototype.initialize.apply(
 this, arguments
 );
 this.handler = new OpenLayers.Handler.Click(



 this, {
 'click': this.trigger
 }, this.handlerOptions
 );
 },

 trigger: function(e) {



 var lonlat = map.getLonLatFromViewPortPx(e.xy);
 alert(You clicked:  + lonlat.lat  + +  
 lonlat.lon);
 }

 });

   var map;



   function init() {
   map = new OpenLayers.Map (map, {
   controls:[
   new OpenLayers.Control.Navigation(),
   new OpenLayers.Control.PanZoomBar(),
   new OpenLayers.Control.LayerSwitcher(),



   ],
   } );

   layerMapnik = new OpenLayers.Layer.OSM.Mapnik(Mapnik);
   map.addLayer(layerMapnik,{layers: 'basic'});
   layerTilesAtHome = new  
 OpenLayers.Layer.OSM.Osmarender(Osmarender);



   map.addLayer(layerTilesAtHome);
   layerCycleMap = new 
 OpenLayers.Layer.OSM.CycleMap(CycleMap);
   map.addLayer(layerCycleMap);

 var click = new OpenLayers.Control.Click();
 map.addControl(click);



 click.activate();

   var dataExtent;
   var setExtent = function() {
   if(dataExtent) 
 {dataExtent.extend(this.getDataExtent());}
   else {dataExtent = this.getDataExtent();}
   map.zoomToExtent(dataExtent);



   };

   var newl = new OpenLayers.Layer.Text( text, {
   location: data.txt,
   } );
   newl.events.register(loadend, newl, setExtent);
   map.addLayer(newl);
   map.setCenter(null, null);




Re: [OpenLayers-Users] Overlay on Google

2009-06-22 Thread Andreas Hocevar
2009/6/22 toni hernández tonidelaca...@gmail.com:
 You should configure ArcGIS to serve 900913. I do not even know if that is
 possible. I guess it is.

If you cannot configure it to server 900913, look for EPSG:3785. That
is the official EPSG code for Spherical Mercator, but at the time that
OpenLayers Spherical Mercator support was written, the official code
was not available yet.

 OpenLayers can't reproject itself.

And Google only provides GMap in EPSG:900913. So you either have to
make ArcGIS serve your layer in 900913, or use a different basemap
than Google that supports 102113 (which seems to be a custom
projection).

Regards,
Andreas.


 On Mon, Jun 22, 2009 at 2:26 PM, moony k_k...@web.de wrote:

 Hi all,

 I want to use Google Maps as baselayer and overlay wms, which are
 delivered
 by ArcGIS Server.
 OpenLayers is always using epsg:900913, but ArcGIS Servers uses epsg:
 102113 for the google projection.
 How can I force OpenLayers to use epsg: 102113 instead of epsg:
 900913?
 Defining the projection in the options doesn't work.

 var options = {
                projection: new OpenLayers.Projection(EPSG:102113),
                //projection: new OpenLayers.Projection(EPSG:900913),
                //displayProjection: new
 OpenLayers.Projection(EPSG:4326),
                units: m,
                numZoomLevels: 18,
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                 20037508, 20037508.34)
            };
           map = new OpenLayers.Map('map', options);

             var gphy = new OpenLayers.Layer.Google(
                Google Physical,
                {type: G_HYBRID_MAP, 'sphericalMercator': true}
            );

 var wms = new OpenLayers.Layer.WMS( Fläche natürlicher Vegetation pro
 Einwohner,


 http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Web/MapServer/WMSServer?;,
                        {layers: '0', srs: 'EPSG:102113',format:
 'image/png', transparent:
 'true'},
                        {singleTile: true, isBaseLayer: false}
                        );

 map.addLayers([gphy,wms]);
 --
 View this message in context:
 http://n2.nabble.com/Overlay-on-Google-tp2973539p3135908.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





-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] OpenLayers+FeatureServer, full edit

2009-06-22 Thread Alexandre Dube
Hi,

   Still trying to make OpenLayers+FeatureServer work in full 
transactional mode.  I looked at the manual json edit example at 
featureserver.org (2) and tried to do the same with my demo (1).

  It works well for Insert/Modify now, but it doesn't with Delete.  The 
FS example (2) has the same problem.  I get a the error :


Invalid JSON. Content was: _method=delete
 

The request is a POST.  I'm not sure, but I think it should be a 
Delete.  I don't know what's wrong yet, but if anyone has a hint, that 
would be appreciated.

(1) demo : http://dev4.mapgears.com/bdga-fs/
(2) http://featureserver.org/demo/json.html
(3) new js file : http://dev4.mapgears.com/bdga-fs/main-ajax.js

Alexandre

Alexandre Dube wrote:
 Hi,

   I tried to remove as much junk as possible to make a simple demo of 
 what I'm trying to do (1).  Here's the link to the js file (2).

   Using firebug, you can see that Insert works, but Modify/Delete 
 don't.  Any small hint would be appreciated.

 Regards,

 Alexandre

 (1) demo : http://dev4.mapgears.com/bdga-fs/
 (2) js file : http://dev4.mapgears.com/bdga-fs/main-simple.js

 == versions ==
 OL v.2.8-rc6
 FS v.1.12

 Alexandre Dube wrote:
   
 Hi,

   I'm looking for a working/live example of OpenLayers+FeatureServer for 
 editing vector features (Insert/Delete/Update).  I currently use TinyOWS 
 to do so with GML/WFS-T and it's working great, but XML is slower than 
 JSON so I would like to switch to FeatureServer.

   A while ago, I tried FS for the first time but abandoned it since it 
 was a bit too complicated for me to make it work with OL :
   http://www.mail-archive.com/users@openlayers.org/msg07392.html

   Now, I back to the exact same problem.  I use OL 2.8-rc6 and FS 1.12 
 and try to use the layer.protocol.commit([features]); to 
 Insert/Update/Delete but I always get Internal server errors 500 on U 
 and D.  Inserts works though.

   So, I'm wondering if someone has already tried what I'm trying to do 
 and is willing to show me a live example of it.  I don't want to be a 
 bother with too many questions.  An example should give me a lot of answers.

   Meanwhile, I'll continue to work on my demo to make it short, simple 
 and live soon hoping it will help me get some aid.

   Many thanks,

   
 


   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] OpenLayers 2.8 Final Release

2009-06-22 Thread Christopher Schmidt
The OpenLayers Development Team is proud to announce the release of
OpenLayers 2.8, the latest stable release of OpenLayers.

The 2.8 release adds a number of important features, the full list of
which can be found in the Release Notes, at
http://trac.openlayers.org/wiki/Release/2.8/Notes. Some of the
highlights include:

 * Support for multi-layer vector feature selection
 * Support for drawing text on vector layers
 * Several new controls
 * 5 new layer types, including OSM, ArcXML, and more.
 * The long-awaited WFS protocol support, and related improvements

... and many other new features and bug fixes that you can see detailed
in the release notes linked above.

For information on possible changes that will need to be made between
this version of OpenLayers and previous versions, please look at the
Release notes, available at the Release Notes information[1].

[1] http://trac.openlayers.org/wiki/Release/2.7/Notes#CompatibilityNotes

Best Regards,
-- 
Christopher Schmidt
MetaCarta
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Map Aspect Ratio Seems Off (Makes layers wide)

2009-06-22 Thread soatley

Andreas,

Thank you for that information!  You've solved my problem and even fixed one
of my todo items of getting the MousePosition into UTM!

Thanks
Shawn


Andreas Hocevar-2 wrote:
 
 Hi,
 
 On Fri, Jun 19, 2009 at 10:38 PM, soatleysh...@niagarafalls.ca wrote:
 
 Your co-workers are right. Maps in geographic coordinates (EPSG:4326)
 look like that. The further you get away from the equator, the more
 the map will be shrunk in latitudinal direction. This is not a bug,
 but a matter of choosing the appropriate map projection.
 
 The GIS staff tell me that our data is projected in UTM 17N NAD83.
 
 The EPSG code for this projection is probably EPSG:26917. See
 http://spatialreference.org/ref/epsg/26917/
 
 So the two things to change in your code is that you set the
 projection to EPSG:26917 instead of EPSG:4326, set units to m
 (meters), and provide the maxExtent in projected coordinates.
 
 Regards,
 Andreas.
 
 
 
 

-- 
View this message in context: 
http://n2.nabble.com/Map-Aspect-Ratio-Seems-Off-%28Makes-layers-wide%29-tp3122010p3138291.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Custom toolbar ...

2009-06-22 Thread Paul james
Hello...
I´d like to make a custom toolbar (with my images...) with :
-zoom in
-zoom out
-pan
- full extent
- measure
- query map
- history
..

How can I do such thing?

Paul
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Custom toolbar ...

2009-06-22 Thread Christopher Schmidt
On Mon, Jun 22, 2009 at 04:55:59PM -0300, Paul james wrote:
 Hello...
 I´d like to make a custom toolbar (with my images...) with :
 -zoom in
 -zoom out
 -pan
 - full extent
 - measure
 - query map
 - history
 ..
 
 How can I do such thing?

Start here:

  http://docs.openlayers.org/library/controls.html#panels

Move onto: 

  http://dev.openlayers.org/apidocs/files/OpenLayers/Control-js.html

Best Regards,
-- 
Christopher Schmidt
MetaCarta
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Custom toolbar ...

2009-06-22 Thread Paul james
Thanks...
Just one last question...
How can I make a control to select a map coordinate (get values in JS, to
call a mapserver function



On Mon, Jun 22, 2009 at 4:57 PM, Christopher Schmidt 
crschm...@metacarta.com wrote:

 On Mon, Jun 22, 2009 at 04:55:59PM -0300, Paul james wrote:
  Hello...
  I悲 like to make a custom toolbar (with my images...) with :
  -zoom in
  -zoom out
  -pan
  - full extent
  - measure
  - query map
  - history
  ..
 
  How can I do such thing?

 Start here:

  http://docs.openlayers.org/library/controls.html#panels

 Move onto:

  http://dev.openlayers.org/apidocs/files/OpenLayers/Control-js.html

 Best Regards,
 --
 Christopher Schmidt
 MetaCarta

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Schaub Buffer external library

2009-06-22 Thread Tim Schaub
Hey-

Joseph Miller wrote:
 
 In February of 2008 Tim Schaub sent an email about a patch in his 
 sandbox that used a minkowski sum (I think) to create a client-side 
 buffer.  The end results typically had self-intersections.  He mentioned 
 that an upgraded version(as an external library) might be on the way 
 that included polygon simplification to remove the self-intersection. 
  Does anyone if this was ever released?  If not, does anyone have any 
 suggestions for an algorithm that could remove self-intersection?  I 
 don't think convex hulls would work because I think the resulting buffer 
 would lose all detail.  Sorting the vertices clockwise using atan2 
 didn't work either.
 

Though I am interested in working on it, it hasn't become a work 
priority since I made that comment.

I would be interested in talking more about what you're working on.

Tim

 Thanks,
 Joe Miller
 
 
 
 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users