pablo zader | 22 Feb 04:39 2015
Picon

Firefox does not work with GeoExplorer (openlayers)

Hi list,

The problem is detected by firebug when GeoExplorer start with Mozilla, but the strange thing is that with google chrome works fine (and IE):

NotFoundError: Node was not found document.getElementsByTagName("head")[0].removeChild...

The exception is thrown in the googlesource.js file, line 334 , in the function loadScript:

loadScript: function(options) { .... window.setTimeout((function() { if (!gxp.plugins.GoogleSource.loader.ready) { this.loading = false; this.ready = false; document.getElementsByTagName("head")[0].removeChild(script); (LINE 334) errback.call(options.scope); this.fireEvent("failure"); this.purgeListeners(); } ....


I understand that there is a problem when firefox wants to access the service google but not so google chrome. 

Thanks in advanced

Pablo


_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Simon Knapp | 21 Feb 04:37 2015
Picon

Image layer obscured by image bounds.

Hi List,

This is the first post from this newbie, so please complain/guide if I do a bad job of explaining myself in this post

I have developed an application that returns an image encoded in a data url to the user, which I place on my map using OpenLayers.Layer.Image. I'm not sure this detail matters, but the user defines a polygon using OpenLayers.Control.DrawFeature with the handler OpenLayers.Handler.Polygon. and a layer named "polygonLayer" The image is added with:

resultLayer = new OpenLayers.Layer.Image(

    'Spatial result',

    resp.result.image.data,

    new OpenLayers.Bounds(resp.result.image.bounds),

    new OpenLayers.Size(resp.result.image.size.w, resp.result.image.size.h),

    {

        isBaseLayer: false,

        displayInLayerSwitcher: false,

        projection: new OpenLayers.Projection('EPSG:900913')

    }

)



The first time a user submits a polygon, the effect is spot on - the image is rendered and looks lovely. When they send a second request, The result is not so pretty, as the image is obscured by something that is probably a representation of the bounding box (not sure if I can add images, but I have tried)




I've been asking Google for help for a while, but have not been able to find the right words.


Can anyone advise on how I can stop this from happening?


Cheers,

Simon Knapp

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Iain Mott | 17 Feb 18:40 2015

scollable popups on ipads etc

Hello,

I'm unable to find a way to get ipad scroll-able popups. I've managed to
get srolling divs working by including the following in the div's css
styling:

-webkit-overflow-scrolling: touch; 
overflow-y: hidden;
overflow-x: scroll;

For example see the large div to the right of the screen here:

http://audiocena.com.br/cerrado/mapa/?fd=16

I've tried the same styling on the popups themselves but I cant get it
to work (ie. try clicking on one of the map markers).

Is there something that I'm missing?

Hope someone can help. 

Thanks,

Iain
Steve.Toutant | 11 Feb 19:00 2015
Picon

RE RE features from multi geometry

I got it work




Steve Toutant/INSPQ/SSSS

2015-02-11 10:31

A
Steve.Toutant-mZazScBh/rgsA/PxXw9srA@public.gmane.org
cc
openlayers-users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org, openlayers-users-bounces-qjLDD68F18NyQMAyxoHuMA@public.gmane.org
Objet
RE [OpenLayers-Users] features from multi geometryLink







I have the same problem with MultiLineString. From a WFS with Mapserver it works but not from geoserver, with the same datasource (postgis)
DescribeFeatureType
with Mapserver: type="gml:GeometryPropertyType
with Geoserver: type="gml:MultiLineStringPropertyType

the response
From geoserver
<gml:MultiLineString srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG:3857"><gml:lineStringMember><gml:LineString srsDimension="2"><gml:posList>-8095778.279048707 6023213.302597357  .....

From mapserver
<ms:msGeometry> <gml:LineString srsName="EPSG:3857"> <gml:posList srsDimension="2">-8105935.433199 6009506.227083 .......


Is it possible to add gml:Multi... features to a vector layer?
An example would be appreciated
thank you!



Steve.Toutant-mZazScBh/rgsA/PxXw9srA@public.gmane.org <at> lists.osgeo.org
Envoyé par : openlayers-users-bounces-qjLDD68F18NyQMAyxoHuMA@public.gmane.org

2015-02-10 14:26


A
openlayers-users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org
cc
Objet
[OpenLayers-Users] features from multicurve









With OL 2.13.1, I send a WFS GetFeature request and I add the features to a vector layer. It works but I have trouble with a layer that is a MultiCurve.
Here is a snippet of the response
<wfs:FeatureCollection
...

<gml:MultiCurve>
<gml:curveMember>
<gml:LineString>
<gml:posList>
-7903140.5994000006 5884323.7800000012 ......
</gml:LineString>
</gml:curveMember>
</gml:MultiCurve>

I don't have any error in the console but the features are not added.
Can we add features in a OpenLayers.Layer.Vector layer that come from a GML: MultiCurve?

Thanks _______________________________________________
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
Steve.Toutant | 10 Feb 20:26 2015
Picon

features from multicurve

With OL 2.13.1, I send a WFS GetFeature request and I add the features to a vector layer. It works but I have trouble with a layer that is a MultiCurve.
Here is a snippet of the response
<wfs:FeatureCollection
...

<gml:MultiCurve>
<gml:curveMember>
<gml:LineString>
<gml:posList>
-7903140.5994000006 5884323.7800000012 ......
</gml:LineString>
</gml:curveMember>
</gml:MultiCurve>

I don't have any error in the console but the features are not added.
Can we add features in a OpenLayers.Layer.Vector layer that come from a GML: MultiCurve?

Thanks

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Ruff, Thomas | 5 Feb 01:30 2015

feature selection events with ModifyFeature control

Could anyone clarify the way feature selection works in OL 2.13.  Currently I'm using a ModifyFeature control that is not configured for standalone mode.  The user clicks features using the mouse and this effectively sets the select render intent on the feature.  The user can also select features from a grid control, in which case I call modifyFeature.selectFeature(featureRef), which also sets the select render intent for the feature.  That all works fine, but now I need to handle selectfeature events and do some extra stuff but when I registered a handler on the layer for the featureselected event like this:

layer.events.on({"featureselected": onFeatureSelectedHandler});

it never gets called.  So I found this link https://github.com/openlayers/openlayers/issues/972 that says this is not a bug I but still really don't understand standalone vs non-standalone mode.  

I also tried adding a selectFeature control and supplying a callback function like this:

selectFeatureControl = new OpenLayers.Control.SelectFeature([layer],
    { onSelect: function () { console.info("selectFeature.onselect fired"); } }
);
map.addControls([modifyFeatureControl, selectFeatureControl]);

but that didn't work either.

What do I need to do in order to be able to receive selectFeature events and still do the other stuff described above?   Should I use standalone or non-standalone mode?  Do I have to use a selectFeature control regardless of the mode if I want an event to fire when a feature becomes selected?

Thanks,
Tom
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Steve.Toutant | 3 Feb 17:56 2015
Picon

How to Get all SRS supported from getCapabilities response?

I'm using OL 2.31.1

A getCapabilities request (request.responseText) is returning this for supported srs
<DefaultSRS>urn:ogc:def:crs:EPSG::3857</DefaultSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::900913</OtherSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::4269</OtherSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::3978</OtherSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::4326</OtherSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::32198</OtherSRS>

This
capabilitiesFormat = new OpenLayers.Format.WFSCapabilities()
capabilitiesFormat.read(request.responseText),
I get only one otherSRS, the last..32198

How can I get all otherSRS from the getCapabilities response?
thanks!
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
VictoriaH | 28 Jan 21:38 2015
Picon

OpenLayers 3 projections

Hello,

I am trying to build a map that uses OSM layers. I know that the default
projection in OL is epsg:900913 or 3857. I have some local mapserver RASTER
layers that are in 4326. I have several questions:

1. Can I reproject the OSM base layer to 4326?
2. Or, do I have to project the local 4326 mapserver raster into 3857?

Depending on the answers to these questions, can someone point me to some
code on how I do one or the other?

I ultimately am going to be building some user interface tools that require
that the user click on the screen. I must return the epsg 4326 coordinates
from the local mapserver wms layer to query the raster itself for pixel
values. Is there anything I should know given my questions above on how I
might do this?

Thanks Much, V

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/OpenLayers-3-projections-tp5184274.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Steve.Toutant | 28 Jan 16:49 2015
Picon

WFS layer with a Prefix

I have problem dealing with wfs layer that has a prefix, mostly from geoserver and tinyows. Everything works if there is no prefix using mapserver.

getCapabilities is returning this as a layer name for 2 layers
<FeatureType xmlns:geomatique="http://domain.com">
<Name>geomatique:msp_si_casernes_geo</Name>

Using OpenLayers.Format.WFSCapabilities.read
It doesn't return featurePrefix in the object, only the layer name

So when OL creates a DescribeFeatureType request it uses typename=msp_si_casernes_geo, instead of typename=geomatique:msp_si_casernes_geo

I'm sure there is something I don't understand in the concept of namespace, prefix, uri namespace alias, etc.....I read many thread but still very confused.
The problem might be on the wfs server side

Help please on how to set a Ol wfs client that will deal with wfs layer thas has prefix and also those who have not

Thanks!

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
zach cruise | 23 Jan 23:01 2015
Picon

a whole LOT of points!

we need to map points, a lot of them. they can only be vector and most
likely static geojson/svg - so no geoserver clustering in the backend
- also want to avoid maptiler:

	1 mil records
	200 mb geojson
	download time 20 sec (over 1.5 mbps)
	dom ready 15 sec (with 2 gb ram)

obviously we are also looking at modest maps in addition to openlayers.

any real world ideas?

can anyone point to a web map with the most vector points?
Giuseppe Falcone | 19 Jan 16:18 2015
Picon

popup dynamic positioning

Hi all,

I have to display a popup onto a map, on mouse hover event and I want that popup is displayed according to the position of the feature on the page; i.e. if the feature is on the right border of the page, the popup is shown on the left of the point, if the feature is on the top of the page, the popup is shown on the bottom of the point, so that it is always visible.

It is possible to do that?

Thanks a lot.

Giuseppe


This is an extract of my code:

m_Map = new ol.Map({
    layers : DLLayers.base.concat(DLLayers.info),
    target: 'map',
    controls:
    [
      new ol.control.Zoom(),
      new ol.control.ScaleLine(),
      new ol.control.MousePosition({
        projection: DLConfig.map.coordProjection
      }),
      new ol.control.ZoomToExtent({
        extent: ol.proj.transformExtent(
          DLConfig.map.initialExtent, DLConfig.map.coordProjection, DLConfig.map.projection)
      })
    ],
    overlays:
    [
      new ol.Overlay({
        element: $("#mapPopup")
      })
    ],
    view: new ol.View({
      center: ol.proj.transform(
        DLConfig.map.centerCoord, DLConfig.map.coordProjection, DLConfig.map.projection),
      extent: ol.proj.transformExtent(
        DLConfig.map.initialExtent, DLConfig.map.coordProjection, DLConfig.map.projection),
      zoom: DLConfig.map.initialZoom,
      minZoom: DLConfig.map.minZoom,
      maxZoom:DLConfig.map.maxZoom
    })
  });


var select = new ol.interaction.Select({
    condition: ol.events.condition.mouseMove,
    layers: function(layer) {return layer.get("selectable");},
    style: function(feature, resolution){
      var size = feature.get('features').length;
      var style = styleHoverCache[size];
      if (!style)
      {
        style = [
          new ol.style.Style({
            image: new ol.style.Circle({
              radius: 12,
              stroke: new ol.style.Stroke({
                color: '#235e41',
                width: 2
              }),
              fill: new ol.style.Fill({
                color: '#46bc83'
              })
            }),
            text: new ol.style.Text({
              text: size.toString() > 1 ? size.toString() : "",
              fill: new ol.style.Fill({
                color: '#fff'
              })
            })
          })
        ];
        styleHoverCache[size] = style
      }
      return style;
    }
  });

  // add map interaction on mouse hover
  m_Map.addInteraction(
    select
  );

$(m_Map.getViewport()).on('mousemove', function(evt) {
    var pixel = m_Map.getEventPixel(evt.originalEvent);
    displayFeatureInfo(pixel);
  });


/*
 * Show feature popup
 */
function displayFeatureInfo(pixel)
{
  $("#mapPopupContent").empty();
  $("#mapPopup").hide();

  var feature = m_Map.forEachFeatureAtPixel(pixel, function(feature, layer){
    return feature;
  });

  if (isCluster(feature))
  {
    var content = buildClusterPopup(feature);

    $("#mapPopupContent").append(content);
    m_Map.getOverlays().item(0).setPosition(m_Map.getCoordinateFromPixel(pixel));
//     m_Map.getOverlays().item(0).setPositioning(new ol.OverlayPositioning('bottom-right'));
    $("#mapPopup").show();
  }
  else if (feature)
  {
    var content = buildFeaturePopup(feature);

    $("#mapPopupContent").append(content);
    m_Map.getOverlays().item(0).setPosition(m_Map.getCoordinateFromPixel(pixel));
    $("#mapPopup").show();
  }
  else
    $("#mapPopupContent").empty();
};


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

Gmane