Reputation
1,746
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 14
Newest
 Yearling
Impact
~107k people reached

  • 0 posts edited
  • 0 helpful flags
  • 94 votes cast
Feb
10
comment Openlayers 3 GeoJson save and load
Obvious explanation would be, that those new features were not stored in same source with old ones. Could you expose that part of code, where you create drawing interactions?
Feb
5
comment Openlayers redraw layers: consecutive redraw calls not working
Are you sure? When map.getLayersByName('bldg_logical') doesn't find any match, it returns empty array []. So you can successfully do tempLayer = [][0] and tempLayer will be undefined. You should add console.log(tempLayer) before tempLayer.redraw(true);
Feb
4
comment Highlight only the center feature on openlayers
Do you want to highlight feature, that is in the center of map? So whenever you pan map, new feature will be highlighted (or no feature at all - if there isn't any in the center of map)?
Feb
4
comment Offline Phonegap/Openlayers App
What's the size of your GeoJSON file? As one option, you could use Localstorage, but you may hit memory size limit with it.
Feb
3
comment OpenLayers 3 Zoom to extent only working in debug?
Indeed, that should fix the problem. Explanation: vector source is loaded asynchronously by AJAX call. In code from user2624067, extent is calculated immediately after creation of GPX layer. Data is not loaded yet, and therefore you get void extent. You have to wait, until loading is completed, like in given sample.
Feb
2
comment Openlayers 3 modify interaction and featureover
I think there isn't any featureover event at all in OL3? For that purpose, you can track mouse position with map.on('pointermove', ... and use map.forEachFeatureAtPixel to detect features. Here's example: openlayers.org/en/v3.13.0/examples/kml.html
Dec
16
comment OL3 Style function
Seems to be correct; just one small notice: remove comma from end of style: customStyleFunction, since it may cause problems in some IE's
Dec
10
comment Routing ensuring all areas are touched
Do you know sequence of those blue points? If sequence is determined, then there's nothing to do with Travelling salesman problem.
Apr
16
comment Calculating distance scale factor by latitude for Mercator
Thanks, answer is really detailed!
Jan
13
comment cluster features styling (by value return of the function)
No, $ doesn't stand for jQuery in given situation; it's markup for OpenLayers and should be within quatation marks.
Nov
1
comment purpose of maxExtent?
I'd like to just point out, that there are incorrect bounds in your example - those are 10x smaller than should, check CaptDragon's answer for correct bounds for Google projection
Oct
11
comment Openlayers SelectControl add multiple Layers
Julien's answer seems to be correct. Just one comment - if you are creating all your layers at once, you can skip setLayer and use window.selectControl = new OpenLayers.Control.SelectFeature([markerLayer, newLayer]);
Oct
3
comment Own layerswitcher value not defined
You should post this as separate question. And also you should add point behind ("Einwohner") and setVisibility :)
Oct
2
comment openlayers: reading polygon attributes
Just some hints: you can use WFS service, and add filtering condition to your query. Since you're using Geoserver, you can use CQL_FILTER, something like CQL_FILTER=LME_ID=123
Aug
22
comment How do I use getinfo to get attribute information i openlayers as I click a feature
Probably most common problem with OpenLayers. As Devdatta told, you need to set up proxy. There are plenty of explanations and examples, for example: trac.osgeo.org/openlayers/wiki/…
Aug
14
comment Clustering not working on features in OpenLayers
Just a thought: add layer to map; then add features to layer
May
22
comment How to get a feature that lies closest to a point in openlayers?
What routing engine are you using? Routing data is in mySql?
Apr
15
comment Openlayers/Proj4js not transforming coordinates the first time
I have experienced same anomaly (and in several different projects) - transformation doesn't work correctly at the first place. Little timeout, execution of that command again, or any other similar hack fixes problem.
Apr
9
comment Why is mapserver layer not showing up in openlayers?
Usually Mapserver explains in plain english, what's wrong and why it doesn't give result. What to do: a) use some kind of developer tool (like FireBug) to examine, whether there are errors in Javascript b) examine WMS request, that is made by OpenLayers (Network tab in FireBug). If necessary, copy URL from FireBug and open it directly in browser. In case of error, you get error report (in XML by default, see Exceptions parameter in WMS query).
Apr
8
comment Query WMS for available layers using Openlayers
I haven't used lot of different proxys, usually it's not neccessary to define allowed remote servers in there. If proxy.cgi does require that - look for another proxy script. Beside that, there should be no problems to add user-defined WMS services dynamically.