3

The default maxExtent of a map with a default projection is the world. center and zoom can be set as map options or by centering the map: var map1 = new OpenLayers.Map('firstmap'); var wms1; var state1="<%=state%>"; var cql_filter1="st_nm='"+state1+ "'"; wms1 = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://localhost:8083/geoserver/wms",...


3

Use OpenMapSurfer. MapSurfer seems to be dead. Use QMS search. Embedded QMS catalog is going to be shut down soon. Yours, QMS creators.


2

layers = new ol.layer.Tile({ ... }); is only one layer so you need to specify layers: [layers], to make it an array


2

Unfortunately, TileLayerPlugin is compatible with QGIS versions 2.8 - 2.99 So, the other option to add custom tiles stored locally on disk - fill in URL (I use Linux, for Windows I suppose you have to change backslashes): file:///path/to/your/custom/tiles/{z}/{x}/{y}.png


2

Besides adding the two labels you can add autowarp option if you would like add the second label in the next line <VendorOption name="autoWrap">50</VendorOption>


2

transform converts the point in place so no new point is returned. See the documentation: Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first. So you want something like: var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286); lonLat.transform(epsg4326, EPSG27700); ...


1

I have solved that issue, the init map is related through use effect, I just give a condition for an initialising map at once and update map size each time import React, { useEffect, useState } from 'react'; import * as ol from 'openlayers'; import { layersCollections, view } from '../map - constants/map-tools'; import { Button, TextField } from '@material-...


1

It can be imitated. You woould need to use a custom style to style the vertices and midpoints similar to https://openlayers.org/en/v4.6.5/examples/polygon-styles.html then use a custom condition function which checks proximity to those points. The OpenLayers 2 example http://dev.openlayers.org/examples/modify-feature.html The standard OpenLayers 4 example ...


1

The Elastisearch geo-shape datatype seems to support any kind of unit (at least judging from the precision field): https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html NGA provides an Elasticsearch datastore that connects to Elastisearch: https://github.com/ngageoint/elasticgeo However, I never tried either personally, and the ...


1

Zoom is not a valid WMS parameter so will be ignored by the server. Also once you call map1.zoomToMaxExtent(); you will get whatever zoom level matches the full extent of your map (possibly that of the WMS layer).


1

OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax: Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs "; or with proj4 version 2: <!doctype html> <html lang="en"> <head> <script type="text/javascript" src="https://cdnjs....


1

You would need to build an extent from the geometries and fit the view to that var extent = ol.extent.createEmpty(); features.forEach(function(feature){ feature.setId(undefined); feature.getGeometry().transform('EPSG:31700', 'EPSG:3857'); ol.extent.extend(extent, feature.getGeometry().getExtent()); }); var map = new ol.Map({ layers: ...


1

The polygon is disappering because you have a problem with coordinate transformations. There are two things you could try: bounds = bounds.transform(EPSG900913, EPSG4326); --> I think you dont need this line or here: srs: map.layers[0].params.SRS --> change the 0 to 1, so that you have the coordinate system of the layer you are querying, not from ...


1

Whit OpenLayers 4.6.5 for change color i'm using this: myLayer.getSource().getFeatures()[1].setStyle(new ol.style.Style({ image: new ol.style.Icon(/** @type {module:ol/style/Icon~Options} */({ // /** @type {olx.style.IconOptions} */ color: '#00ffff', // #FF0000 crossOrigin: 'anonymous', src: '/img/dot.png' })) })); ...


Only top voted, non community-wiki answers of a minimum length are eligible