Re: [OpenLayers-Users] Find out about the geometrytype of a layer

2010-04-15 Thread Barbara Fiederer

Hi Alexandre,

the error is here: line 513 of vector.js:
 !(feature.geometry instanceof this.geometryType)) {  .
feature.geometry is undefined, this.geometryType is
OpenLayers.Geometry.MultiLineString

When I check in line 488 of vector.js addFeatures: function(features,
options) { ... there is one object in the array with correct geometryType.

Anything else for me to check?

Thanks, Barbara
-- 
View this message in context: 
http://n2.nabble.com/Find-out-about-the-geometrytype-of-a-layer-tp4896190p4905831.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] LayerSwitcher in OpenLayers2.9.RC2 in wrong place on the map

2010-04-15 Thread paweluz

Hi!

I have been wondering how come my layer switcher appears in left top corner
of the map. It does not look good. Here is screen:

http://img171.imageshack.us/img171/303/errir1.png

When I open it it looks like this:

http://img512.imageshack.us/img512/994/error2l.png

In version 2.8 of Openlayers I did not have this kind of problems. I had my
layer switcher in the right top corner and everything was working fine... Is
there a way to fix this??

Regards,
Poul
-- 
View this message in context: 
http://n2.nabble.com/LayerSwitcher-in-OpenLayers2-9-RC2-in-wrong-place-on-the-map-tp4906606p4906606.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] Adding features from WFS to Vector layer question

2010-04-15 Thread David Alda Fernandez de Lezea

Hi, 

I'm trying to add some features from 2 WFS different layers to the same Vector 
Layer in Openlayers. If I don't ask for any attribute apart from the geometry, 
the features are added without any problem. But in my case I want the features 
to be added with some attributes that may differ. For example, I ask the 
following:

wfs:GetFeature
wfs:Query typeName=RecintosSigpac
PropertyNamemsGeometry/PropertyName
PropertyNamePROVINCIA/PropertyName
PropertyNameMUNICIPIO/PropertyName
PropertyNamePOLIGONO/PropertyName
PropertyNamePARCELA/PropertyName
PropertyNameRECINTO/PropertyNameogc:Filter... FILTER HERE .../ogc:Filter
/wfs:Query
wfs:Query typeName=ParcelasSigpac
PropertyNamemsGeometry/PropertyName
PropertyNamePROVINCIA/PropertyName
PropertyNameMUNICIPIO/PropertyName
PropertyNamePOLIGONO/PropertyName
PropertyNamePARCELA/PropertyNameogc:Filter... FILTER HERE 
.../ogc:Filter
/wfs:Query
/wfs:GetFeature

They differ in one attribute, but I want them to be in the same layer. I add 
the fetures using GML:

var fetures = new OpenLayers.Format.GML.v3({featureType: layerName,featureNS: 
http://mapserver.gis.umn.edu/mapserver; }).read(data);
vectorLayer.addFeatures(fetures);

I loop through a layerName array to add the features, but I get an error:

obj.attributes is undefined
[Break on this error] 
obj.features.push(feature);},_geometr...Members;}else{name=featureMember;} 

It is caused because I'm processing features with different attributes?? How 
can I solve it??

Thanks.
 
 
Un saludo,
 
··

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··
email: da...@ikt.esweb: www.ikt.es
··
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] LayerSwitcher in OpenLayers2.9.RC2 in wrong place on the map

2010-04-15 Thread bartvde
Did you update your theme directory?

The css has changed (things have been moved in to css from the
LayerSwitcher).

Best regards,
Bart


 Hi!

 I have been wondering how come my layer switcher appears in left top
 corner
 of the map. It does not look good. Here is screen:

 http://img171.imageshack.us/img171/303/errir1.png

 When I open it it looks like this:

 http://img512.imageshack.us/img512/994/error2l.png

 In version 2.8 of Openlayers I did not have this kind of problems. I had
 my
 layer switcher in the right top corner and everything was working fine...
 Is
 there a way to fix this??

 Regards,
 Poul
 --
 View this message in context:
 http://n2.nabble.com/LayerSwitcher-in-OpenLayers2-9-RC2-in-wrong-place-on-the-map-tp4906606p4906606.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


Re: [OpenLayers-Users] LayerSwitcher in OpenLayers2.9.RC2 in wrong place on the map

2010-04-15 Thread paweluz

Thanks a lot for your help Bart! That was it. I copied only the OpenLayers.js
file without the theme folder. Now everything is working fine.

Regards,
Poul
-- 
View this message in context: 
http://n2.nabble.com/LayerSwitcher-in-OpenLayers2-9-RC2-in-wrong-place-on-the-map-tp4906606p4906776.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] Expanding the hitbox for selectFeature?

2010-04-15 Thread Alexandre Dube
Hi Phil,

You could make the features larger by changing the 'strokeWidth' 
property of your features.

Alexandre


Phil Scadden wrote:
 I am finding that you need incredibly accurate clicking to selectfeature 
 (especially when geometry is a line). Is there away of expanding the hitbox?


 Notice: This email and any attachments are confidential. If received in error 
 please destroy and immediately notify us. Do not copy or disclose the 
 contents.

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


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


[OpenLayers-Users] Custom Toolbar

2010-04-15 Thread Andrew Haigh
OpenLayers 2.9 RC 2

I'm attempting to create a custom tool and toolbar class but I seem to be
running into an issue with the custom toolbar.

Here is my code below

ZoomToAgreementExtent = OpenLayers.Class(OpenLayers.Control, {
type: OpenLayers.Control.TYPE_BUTTON,
trigger: function() {
if (this.map) {
alert('this is a test');
}
},
CLASS_NAME: ZoomToAgreementExtent
});

ApplicationToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this,
[options]);
this.addControls([
  new OpenLayers.Control.Navigation(),
  new OpenLayers.Control.ZoomBox(),
  new ZoomToAgreementExtent()
]);
},
draw: function() {
var div = OpenLayers.Control.Panel.prototype.draw.apply(this,
arguments);
this.activateControl(this.controls[0]);
return div;
}
CLASS_NAME: ApplicationToolbar
});

Then on my map init method I do this:

var appToolbar = new ApplicationToolbar();
map.addControl(appToolbar);

The ZoomToAgreementExtent control seems to work fine but when I try and add
the ApplicationToolbar (which I based on the NavToolbar) I get the following
error in FireBug:

this.initialize is undefined in OpenLayers-2.9-rc2.js on line 117.

I assume that there isn't a bug in the Open Layers library but instead there
is something wrong with my code.

Any ideas?

Thanks

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


[OpenLayers-Users] Displaying Base layers by Zoom Scale

2010-04-15 Thread Odeneho

Hi,

I am developing an openlayers application with data from geoserver. I have 5
wms baselayers which I would like to display base on a users zoom scale
instead of having the layerSwitcher added to the map control. How can it be
achieved without the layerswitcher?

Thanks in advance.
-- 
View this message in context: 
http://n2.nabble.com/Displaying-Base-layers-by-Zoom-Scale-tp4907408p4907408.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] Displaying Base layers by Zoom Scale

2010-04-15 Thread Alexandre Dube
Anthony,

Take a look at the minScale/maxScale and/or minResolution/maxResolution 
properties of the Layer object. This might be enough to accomplish what 
you're looking for. See also [1] for an example of use (isn't really 
used in the example, but looking at the code source will show how to 
define them).

Alexandre


Odeneho wrote:
 Hi,

 I am developing an openlayers application with data from geoserver. I have 5
 wms baselayers which I would like to display base on a users zoom scale
 instead of having the layerSwitcher added to the map control. How can it be
 achieved without the layerswitcher?

 Thanks in advance.
   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [OpenLayers-Users] How to print map area with openlayers

2010-04-15 Thread Lisa Gaudette

The easiest thing is to print the page containing the map (or a simpler print
page containing the map).

For other approaches, this may help:
http://trac.openlayers.org/wiki/Printing
-- 
View this message in context: 
http://n2.nabble.com/How-to-print-map-area-with-openlayers-tp4901023p4907550.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 print map area with openlayers

2010-04-15 Thread soatley


rakesh.modi1585 wrote:
 
 Hi,
 
 I want to print map area (WMS Layer) with overlay vector layers. Is it
 possible in openlayers, if it then how it is done?
 
 Thanks 
 Rakesh
 

Check out the link that Lisa said in her e-mail.  We resorted to a server
side stitching because we couldn't rely on the differences between browsers. 
Some browsers wouldn't be able to print all the layers and we didn't have
much success with printing vector.  

By going server side, we can control all that (including vectors) and
provide options for output (JPG, PDF, etc..)

Shawn
-- 
View this message in context: 
http://n2.nabble.com/How-to-print-map-area-with-openlayers-tp4901023p4907889.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] drawFeature control needs two clicks...?

2010-04-15 Thread Chris Green
Dear all

 

I have a situation that I can't get to the bottom of, and I'm hoping that
someone can help me understand it. The following code is intended to add a
new circle each time the user clicks a map, which it does.

 

My problem is that two clicks are needed for any circle to be drawn: it is
as if the first click activates the drawFeature control (and also removes
any existing circle) but does not draw anything, and then a second click
draws the feature.  So far as I can understand two clicks should not be
needed..? Any suggestions what I am doing wrong please?

 

 

 

Chris

 

 

 

 

   circle1Layer = new OpenLayers.Layer.Vector(Circle 1, {

 styleMap : circle1Style

 }); 

 

map.addLayer(circle1Layer);

map.addControl(new OpenLayers.Control.MousePosition());

   

   function circle1FeatureAdded(feature){

   if (circle1.activate=true){

   circle1.deactivate();

 }

   }

   

   var circle1Options = {sides:20, radius: Radius, persist: true};

   circle1 = new OpenLayers.Control.DrawFeature(circle1Layer,

OpenLayers.Handler.RegularPolygon,

{handlerOptions: circle1Options}

 );

  

  map.addControl(circle1);

  

   circle1.activate();

   

   circle1.events.register('featureadded', circle1,

   circle1FeatureAdded);

  

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


[OpenLayers-Users] Load es.js

2010-04-15 Thread Vidal, Antoni
Hello list,

 

I didn't found an example. How can I load es.js and get messages in spanish by 
dafault?

 

Thank's in advance

 

Antoni Vidal

Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya 
http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20CatalunyaXYADDRESS=429486:4580392
 
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat http://www.icc.cat/ 

 

 

 

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


[OpenLayers-Users] Duplicate labels display in ArcGIS Server REST map service when viewing through OpenLayers API

2010-04-15 Thread Shira Bezalel
I've created a very simple ArcGIS Server dynamic map service (REST) for a 
single polygon layer with about 10 features. When I view the service in my 
OpenLayers demo app, the labels are duplicating -- that is, I'm seeing about 5 
labels per feature. Not sure why. Has anyone seen this before and better yet, 
does anyone have know how to prevent this label duplication? I only want one 
label per feature to display. 

Thanks much, 
Shira 


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


[OpenLayers-Users] Adding a custom marker on map by clicking.

2010-04-15 Thread Subhani Minhas
Assalam o alaikum dear all.
I have recently started coding in openlayers 2.8, my starting point was the
code generated by map tiler tool. Now I want to add further functionality by
clicking on the map, and adding a custom marker. By custom I mean to specify
following:
1. Specify marker's location.
2. Custom Marker icon
3. Ability to show markers text without clicking on it at all times.
4. Ability to specify markers zoom levels between which it should be
visible.
5. Ability to hide and show whole markers layer.
6. Ability to export the marker layer to kml.

I am sorry if I am asking too much, but I have seen almost all openlayers
marker example codes and none can do even the most basic thing like clicking
anywhere on map to add a marker. Also I can't seem to find any code in 2.8
examples to show text labels with or without markers.
Any small code snipets will be extremely welcome. Thanks.

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


Re: [OpenLayers-Users] drawFeature control needs two clicks...?

2010-04-15 Thread Alexandre Dube
Chris,

Chris Green wrote:

 I have a situation that I can’t get to the bottom of, and I’m hoping 
 that someone can help me understand it.

 circle1 = new OpenLayers.Control.DrawFeature(circle1Layer, 
 OpenLayers.Handler.RegularPolygon, {handlerOptions: circle1Options});

Use OpenLayers.Handler.Point instead of 
OpenLayers.Handler.RegularPolygon to draw points on single click.

Regards,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [OpenLayers-Users] Load es.js

2010-04-15 Thread Alexandre Dube
Antoni,

1. Add the lang file
script src=$PATH_TO_OL/lib/OpenLayers/Lang/es.js/script

2. On init (body onload or whatever you load first)
OpenLayers.Lang.setCode(es);

That should do it.

Regards,

Alexandre


Vidal, Antoni wrote:

 Hello list,

 I didn’t found an example. How can I load es.js and get messages in 
 spanish by dafault?

 Thank’s in advance

 *Antoni Vidal*

 Unitat d'Aplicacions SIG-WEB
 Institut Cartogràfic de Catalunya 
 http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20CatalunyaXYADDRESS=429486:4580392
 Parc de Montjuïc, E-08038 Barcelona
 Tel. (+34) 93 567 15 00 (ext. 3228)
 www.icc.cat http://www.icc.cat/

 

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


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [OpenLayers-Users] Adding a custom marker on map by clicking.

2010-04-15 Thread Alexandre Dube
Hi Ghulam,

Subhani Minhas wrote:

 1. Specify marker's location.
 2. Custom Marker icon

  Here's a really good example for you to start from :
  
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/styles-unique.html

  In it, you'll be able to find what you need for 1) and 2).  Please 
note that the markers in the example are OpenLayers.Feature.Vector 
object, and not OpenLayers.Marker objects.

 3. Ability to show markers text without clicking on it at all times.

  You'll be able to use a SelectFeature control with 'hover': true 
property in order to have your text (or popup) open when the feature is 
hovered.  See this example.
  
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/highlight-feature.html

 4. Ability to specify markers zoom levels between which it should be 
 visible.

That's should be your hardest point to accomplish in my opinion.  You 
should finish by this one.  I'm not sure what could be the best way to 
accomplish this.  I'll let others response.


 5. Ability to hide and show whole markers layer.

  Can be done with the layerSwitcher :
  
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/layerswitcher.html


 6. Ability to export the marker layer to kml.

Here's an demo doing it (last button in toolbar, you need to draw a 
feature first)
  
http://dev.geoext.org/sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.html

Here's the lib use for kml exportation
  http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/data/Export.js


Hope this helps,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [OpenLayers-Users] drawFeature control needs two clicks...?

2010-04-15 Thread Chris Green
Hi Alex

Thanks for the suggestion, it works!

ButI can't see how to change the radius of the point that is drawn - is
it possible?


Chris 

-Original Message-
From: Alexandre Dube [mailto:ad...@mapgears.com] 
Sent: 15 April 2010 18:05
To: chris.gr...@ibstv.co.uk
Cc: users@openlayers.org
Subject: Re: [OpenLayers-Users] drawFeature control needs two clicks...?

Chris,

Chris Green wrote:

 I have a situation that I can’t get to the bottom of, and I’m hoping 
 that someone can help me understand it.

 circle1 = new OpenLayers.Control.DrawFeature(circle1Layer, 
 OpenLayers.Handler.RegularPolygon, {handlerOptions: circle1Options});

Use OpenLayers.Handler.Point instead of 
OpenLayers.Handler.RegularPolygon to draw points on single click.

Regards,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com



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


Re: [OpenLayers-Users] drawFeature control needs two clicks...?

2010-04-15 Thread Alexandre Dube
Chris Green wrote:
 Hi Alex

 Thanks for the suggestion, it works!

 ButI can't see how to change the radius of the point that is drawn - is
 it possible?
   
Yes.  Take a look at the following file at line 392 :
http://trac.openlayers.org/browser/tags/openlayers/release-2.9-rc2/lib/OpenLayers/Feature/Vector.js

There you have the default symbolizers for features drawn.  You 
overwrite these by using the OpenLayers.Util.applyDefaults method, see 
in this acticle (the first gray box, below *Basics*)

What you're looking for is 'pointRadius'.

Kind regards,

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [OpenLayers-Users] drawFeature control needs two clicks...?

2010-04-15 Thread Alexandre Dube
Alexandre Dube wrote:
 see in this acticle (the first gray box, below *Basics*)
   
http://trac.openlayers.org/wiki/Styles

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

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


[OpenLayers-Users] Ajax request filter

2010-04-15 Thread geojoe

The filter I've setup should return 6 records. The same request sans filter
returns 10 records.

Is my date string correct?   What am I doing wrong?

Thanks

   var currentTime = new Date(); //from 01-01-1970 12:00 AM
   var dd = currentTime.getDay();
   var mm = currentTime.getMonth();
   var yy = currentTime.getYear();
   var today = mm+/+dd+/+yy;

   myFilter = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
   property: end_date,
   value: today
});

   //Get users
   var thelayer  = bm_user;
   var myrequest =
http://xx..edu:8080/geoserver/wfs?outputformat=jsonrequest=GetFeatureversion=1.1.0typeName=Biofuels:+thelayer+extractfields:truefilter=+myFilter;

-- 
View this message in context: 
http://n2.nabble.com/Ajax-request-filter-tp4909804p4909804.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] Suggestion for hosting platform?

2010-04-15 Thread Jeff Dege
I'm building a site that involves a couple of editable vector layers drawn on 
top of a landbase.  In development, I've been working with a publicly 
accessible WMS, but that won't fly for our production system.  I need more 
control of what features will be displayed at which resolutions.  So I need to 
set up a landbase server, that I can access from OpenLayers.

We're planning to start with the Tiger data.  The question is how best to host 
it.  Our previous systems used KaMap layers, creating tiles with MapServer, 
from shape files.  The performance has only been barely acceptable, and the 
configuration has been a constant headache.  So, I'm looking for alternatives.

It looks to me like we've three decisions to make.

1st, the access method - the OpenLayers layer type.  WMS?  WFS? WMS-T? KaMap, 
again?  We'd like to have some ability to query features, which we don't have 
with KaMap, but not at the cost of performance.

2nd, the data store.  Mapserver and shape files have been fairly slow, for us, 
so we're thinking about using a GIS database.  PostGIS is free, we have a 
license that would allow us to use Microsoft's new GIS capabilities in 
SqlServer.

3rd, the actual serving application.  KaMap acts as its own server.  If we 
decide on WMS, using a PostGIS database, what Open Source options are there for 
WMS server applications?  I have a vague understanding that MapServer can be 
configured to run as a WMS server.  How well does it work?  How does it perform?

Does PostGIS have a WMS-serving capability?  SqlServer?

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


Re: [OpenLayers-Users] Suggestion for hosting platform?

2010-04-15 Thread Mapmaker

Hey Jeff,

I've had great performance with a GeoServer/OpenLayers setup.

GeoServer will offer you several configuration options- so you can tweak
your environment to match your needs as they change.  GeoServer supports
shapefiles, postgis, and sql server- as well as several other data stores
and will render WMS, WFS, WCS, KML, and plenty of other formats.

PostGIS will not serve WMS directly (to the best of my knowledge)- but will
allow you to extract GML and KML vector data from your SQL queries.

Feel free to check out the Open GeoPortal application I developed using a
fairly straightforward GeoServer/OpenLayers setup: 
http://www.opengeohost.com/maps/stlawrence/
http://www.opengeohost.com/maps/stlawrence/ 

This application has several commercial basemap layers and all the overlays
are single tile WMS layers served up by GeoServer from a shapefile store. 
The search functionality is accomplished via WFS and CQL queries. 
Everything is wrapped up in an ExtJS layout- providing plenty of screen real
estate for the various tools and tabs.

Best of luck with your application and I hope I was able to help answer some
of your questions!

BRYAN
-- 
View this message in context: 
http://n2.nabble.com/Suggestion-for-hosting-platform-tp4910033p4910105.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] Problem (and possible solution) for Openlayers + IE8 + local files.

2010-04-15 Thread Phil Scadden
I have been having trouble with access denied using openlayers on a 
USB stick (off internet) application when the browser is IE8. Hassles 
with ajax (possibly) and with XMLHttpRequest. I noticed that ajax via 
JQuery has no problem so started comparing code.

It would seem that the in IE7 8, the xmlhttprequest is implemented, but 
it doesnt work for local files. You
have to use the ActiveXObject (XMLHTTP) instead. JQuery seems to do this 
thanks a look at
window.document.protocol == file:.

It seems to fix this you need to change in ajax.js
  getTransport: function() {
 return OpenLayers.Util.Try(
 function() {return new XMLHttpRequest();},
 function() {return new ActiveXObject('Msxml2.XMLHTTP');},
 function() {return new ActiveXObject('Microsoft.XMLHTTP');}
 ) || false;
 },
(I did this successfully) but also
XMLHttpRequest.js
 function cXMLHttpRequest() {
 this._object= oXMLHttpRequest ? new oXMLHttpRequest : new 
window.ActiveXObject('Microsoft.XMLHTTP');
 };

I am less sure of exactly what this code is trying to achieve so 
reluctant to fiddle. Would someone like to give this a go?


-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

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


[OpenLayers-Users] Positional Accuracy of Drawn Overlays

2010-04-15 Thread ScottCh

Hello OpenLayers Users,

We plan to use OpenLayers for a project that requires accurate positioning
of overlay objects drawn on an overlay layer above the map layer.  We plan
to use an updated base map layer such as one of the GSHHS tile sets.

One of the stakeholders in this project has asked me to determine how
accurate OpenLayers will be for this purpose.  In other words, if the user
draws a rectangle that precisely bounds the Isle of Wight with our product,
how far off is it likely to be in the real world?  Is the coincidence
between map layers uniform?

The first time I tried to answer this question, I responded in terms of the
map layer's accuracy.  It was pointed out to me that this is not the full
answer.  It doesn't matter how accurate the map layer is, if the points that
I have selected on my overlay layer are off in relation to the map.

I have read several postings here that relate to how OpenLayers handles map
projections, and see that it uses Proj.4 to perform its geospatial math. 
Unfortunately, I don't know enough yet to ask the right question, or where
to look in the code.  

Has anyone come across this issue already?  

I would like to verify that OpenLayers handles the intersections between the
map layer and layers above well enough for our needs, so that we can move
forward to implementation.  Kind thanks for any pointers!

Scott C.
Cary, NC USA 
-- 
View this message in context: 
http://n2.nabble.com/Positional-Accuracy-of-Drawn-Overlays-tp4910847p4910847.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] Further to openlayers, IE8 and local files.

2010-04-15 Thread Phil Scadden
If I change XMLHttpRequest to

 function cXMLHttpRequest() {
 if (window.location.protocol == file:) {
  this._object=   new 
window.ActiveXObject('Microsoft.XMLHTTP');
 } else {
 this._object= oXMLHttpRequest ? new oXMLHttpRequest : 
new window.ActiveXObject('Microsoft.XMLHTTP');
 }
 };

then the code works in IE8. (Obviously doesnt in FF - I am hoping 
someone better in JS can fix this up).

The fix need to work for requests are going to both web and file (could 
have layers from both). jQuery's structure seems good for this.


Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

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