Tag Info

New answers tagged

0

You have updated params before you'd defined the SLD variable. wms_p_popf.updateParams({STYLES: undefined, SLD_BODY: SLD}); var SLD = ...


0

For a remote SLD to be applied to a Layer you must make sure that the <Name> in the <NamedLayer> is the same as the name of the layer you are styling. So in your case pack_geomarketing_iris13_region doesn't match DatashinePBS:PopF so nothing is drawn. You might also want to check in GeoServer that the SLD is in fact valid (as GeoServer doesn't ...


0

Test WMS <link rel="stylesheet" href: "http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css" /> <!-- <link rel="stylesheet" href: "C:/ol3_samples/assests/css/samples.css" type="text/css" /> --> http://openlayers.org/en/v3.0.0/build/ol.js" > var wms_source = new ol.source.TileWMS({ url: ...


0

Displaying Asian place names with Latin characters is not a matter of OpenLayers, but of the used map tile graphics. You can try some other tile sources, see the OSM wiki about Map Internationalization. Tell us if you have trouble to include those other map tiles in your framework. And always pay attention of the tile producer's licente and terms of use.


1

Found this page where someone else had the same problem. Format image/gif does not support opacity. Changing my format to image/png solved the problem.


2

A new projection was introduced in GeoServer 2.2 to handle exactly this kind of situation: Better support for un-referenced data with the new EPSG:40400 code that identifies a coordinate system made up of a generic 2D Cartesian plane. Your data will be representated correctly, but it will not be possible to reference it relative to data in another ...


0

If you want to move the button outside the map div, use the target property of the ol.control.ZoomToExtent class, see api


1

There is a "unofficial" Control called OpenLayers.Control.LayerSwitcherGroups which you can find here: https://raw.githubusercontent.com/rkj/openlayers/master/lib/OpenLayers/Control/LayerSwitcherGroups.js Just include the Script after your OpenLayers.js and use it like this: var group = [hospitals, schools]; for (var i=0; i < ...


0

If I understand correctly you should be able to do a table join then simply assign a color in your polygon styling. function drawPolygon(feature, olmap, hexFillColor, opacity) { var selected_polygon_style = { strokeWidth: 1, fillColor: hexFillColor, fillOpacity: opacity, } feature.style = selected_polygon_style; ...


1

In 3.7.0 you can do it that way: var extent = [123,345,567,891]; $('#custom_btn-zoomtoextent').on('click', function () { map.getView().fit(extent, map.getSize()); }); (in older Versions it's fitExtent)


0

Check out this OpenLayers 2 Example. Google Layers should work fine without a key. The problem may be that your googleapi script <script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript" ></script> differs from that in the example shown below. <script ...


3

Here's an example of how to draw an arc by center point, radius, start angle, and end angle. Depending on the use case you have in mind this may be a viable option.


1

I will try to be as clear as possible, but I am not sure I understood everything that your are asking. You might want to edit your post with additional information or a concrete example and the version of Geoserver you are using. Problem 1: you have duplicate labels due to the tiling of your WMS request by OL -> solution: in Open Layer, request a single ...


0

I believe this has been answered before, this individual had a similar problem. Best of luck.


1

One way to do this is using canvas. Here's a working solution: html2canvas This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the ...


6

As the GIS SE tag descriptions note: OpenStreetMap (OSM) is data OpenStreetMap is a collaborative project to create a free editable map of the world. The data is free, and free of legal and technical restrictions. OpenStreetMap is often shorted to OSM. OpenLayers is a client viewer OpenLayers is a JavaScript library which implements an API for ...


2

"Normally" the bbox should be: left, bottom, right, top west, south, east, north minX, minY, maxX, maxY so I would try: bbox: [-1050091.8944356, 4675576.582525099, -990623.88643799, 4733515.8499572] PS: there is a nice BBOX-Cheatsheet: https://github.com/perrygeo/bbox-cheatsheet/blob/master/reference.md Even if OpenLayers/Geoserver is missing there I ...


0

If you don't define SRID for the geometry column at the time of its creation, you can insert geometries with any SRID. I can't think of a reason you would want to do that though. It's reasonable to store all geometries with the same SRID. I see three options you have: create new geometry column and fill it with st_transform(geom1, new_srid) use ...


0

You could try "value": encodeURI("BÖRT De Sem") instead of "value": "BÖRT De Sem"


1

One other option would be to define a new Style and assign the stroke width... but the solution you found looks smarter ;) var highlight = function(feature) { feature.style = new OpenLayers.Style(); feature.style.strokeWidth = 3; feature.style.fillColor=context.getFillColor(feature); vector.drawFeature(feature); }; working example: ...


0

Initially I found the answer to it that is to ad tileManager: null in the Heron.options.map.settings. Find the answer here: https://github.com/heron-mc/heron-mc/issues/430, where the jpg showing the change in js file.


4

The features of OpenLayers 3, which distinguish it from OpenLayers 2, seem to be described in a blog post entitled Hot new features in OpenLayers 3: It makes heavy use of the new capabilities of modern Web browsers (Canvas, WebGL) and opens a whole new world of possibilities like client-side vector rendering, integration of 3D data, and many more. ...


1

just figured out what my problem is. I'm using deprecated functions in openlayers 3. My bad. Here is a post that describes how to achieve what I want: OpenLayers 3 Extent of all features on a vector layer? And here is the code that works: var extent = vector.getSource().getExtent(); map.getView().fitExtent(extent, map.getSize());


0

Already figured out: When you initialize the draggable you can set the element where you dont want to star dragging: $('#container').draggable({ cancel: '#map' }); JSFiddle: http://jsfiddle.net/hbyvynLn/


1

After some more research, I found the solution here. The feature.style property only accepts the symbolizer as hash style. So, we must use the styleMap to create a symbolizer for the current feature var highlight = function(feature) { var style = $.extend({}, styleMap.createSymbolizer(feature), { strokeWidth: 5 }); feature.style = ...


2

If the degree coordinates should be in Helsinki (for which UTM zone 35 is correct), you should enter 24.9993393, 60.184716. Note that proj expects East - North order, with negative singns for Southern and western coodinates. Converted to EPSG:3067, the coordinates are 389042, 6673664.



Top 50 recent answers are included