Tag Info

New answers tagged

0

When you're declaring your layers you can simply add a 'layerType' attribute from which you can later use to add and remove layers as a group. var birmingham = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.transform([-1.900878, 51.483952], 'EPSG:4326', 'EPSG:3857')), name: 'Birmingham', layerType: 'layerOne' }); When declaring your ...


0

It has been fixed as of version 2.3.10 of proj4js. If the destination projection has the ft or us-ft for the +units property, the transform method will convert it to us survey feet automatically: Add handling for +units in projString


2

GeoServer supports the WMS GetLegendGraphics request. See: http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/legendgraphic.html


2

You could just use a different version of google-maps-api, for example http://maps.google.com/maps/api/js?v=3.5&sensor=false Example: http://jsfiddle.net/expedio/sodserrw/ The same example with your Google-API address (https://maps.googleapis.com/maps/api/js ) is also not working: http://jsfiddle.net/expedio/zx4k29k5/


1

The area will be in the units of your map projection. Default is EPSG:3857 -> meters map.getView().getProjection() will get your the information


-1

From: http://trac.osgeo.org/openlayers/wiki/SelectFeatureControlMapDragIssues try setting stopDown = false on the SelectFeature. That is, selectFeatureControl.handlers.feature.stopDown = false; // for OL2.7 OR selectFeatureControl.handler.stopDown = false; // for OL < 2.7 selectFeatureControl.handler.stopUp = false;


0

I managed to show coordinates in geo-explorer within opengeosuite: open the composer.html in the template folder at the end of the code add the following code: app.mapPanel.map.addControl( new OpenLayers.Control.MousePosition( { prefix: ' Lon ', separator: ' , Lat ', numDigits: 2, displayProjection: new OpenLayers.Projection("EPSG:4326")}) ...


0

See this answer and this example. I hope this helps.


0

Define a save strategy as follow and add it to you map: var saveStrategy = new OpenLayers.Strategy.Save(); Modify the features and then call: saveStratefy.save();


0

The easiest way to combine the layers and still cache them using GeoWebCache is to use a LayerGroup which acts exactly like a layer in OpenLayers but is built up from the 3 layers in GeoServer. This is only more efficient if your client always wants to see all three layers.


0

Do you want it dynamic, as in, you can change which of the three to view client-side? IF so, you can form up a request that combines 1,2 or 3 layers into a single get request, and OpenLayers can handle this, I reckon. But, do you need to? Try it the simple way first, and then if you are experiencing performance issues, look into combining it. To answer ...


0

Yes. Check out MapProxy, which is capable of combining multiple tile sources, among lots of other things. Really cool app. I can't speak authoritatively on efficiency with this approach, but your app is only making one call instead of three. That seems more efficient, right? You might even find that it's preferable to handle caching with MapProxy instead. ...


0

You should be able to do this using open source technologies and without resorting to so much Java if you dont want to. Check Leaflet for showing a map/geometries. (JavaScript) You should still be able to use GeoServer through its API's. A webapp can have HTML/CSS/JS and it should be possible to have PHP in there too. Also a personal suggestion, I would try ...


0

Thanks for your quick reply. As you pointed out , the tiles such as "10/509/512.png " didn't exist. The question is that the tile url parse scheme which i used doesn't match my local tile server. Fortunately, i have found the solution. http://tileserver.maptiler.com/#nasa/ol3cesium.code I followed this method, and i can show my local tiles now. Openlayers3 ...


0

Ok, so you said that you can directly access the .pngs from your browser with the following link http://localhost:8089/Maps/15/26933/12364.png. Now if you have that working you know for sure its not your servers fault. Which then points to the code you made. Error 404 usually means that the data you requested doesn't exist or you are trying to access ...


1

Geoserver is not mandatory. If you need a WFS or WMS or WMTS or WPS or CSW or WCS server for your application needs, it is an option, but there are other options for all of those, in open source and proprietary forms. If you are looking for open source options, many are listed at OSGeo - see the project links under Web Mapping and Metadata Catalog headings. ...


0

Ok, so in the absence of a better solution, I'll just cut the parts I want and rearrange the hierarchy. var kml = "<kml xmlns='http://earth.google.com/kml/2.0'>"; kml += "<Folder><name>My export</name><description>Some description</description>"; var layerString = ""; // Write features into a KML string for (var i = ...


5

You can use bezier Curves algorithm. Bezier algorithm convert broken line to smooth line. Use the following example: <html> <head> <script src="http://dev.openlayers.org/OpenLayers.js" type="text/javascript"></script> <title>Ya Mahdi</title> <style> html,body { height: 99%; width: 99%; } ...


0

getDataExtent() does not work with a WMS layer, there is more info in the answer given here: How to get layer extent in open layers or Zoom to wms layer extent?


2

This works: OpenLayers.Handler.PolygonHolePuncherHandler = (function PolygonHolePuncherHandler_module( OpenLayers, undefined ) { //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// /** * Example: var drawControl = new OpenLayers.Control.DrawFeature( olVectorLayer, OpenLayers.Handler.PolygonHolePuncherHandler, { ...



Top 50 recent answers are included