Tag Info

Hot answers tagged

4

The following will open a new page when the drawn feature is clicked: map.on('draw:created', function (e) { var type = e.layerType, layer = e.layer; layer.on('click', function(){ window.open('http://www.example.com','_blank'); }); drawnItems.addLayer(layer); }); This will bind a popup with a url: ...


2

there are two different way you can try, 1) you need to host your web server to receive the file that client uploaded. The file will be processed in your server and return the geojson file to the front-end. here is an example (with php) http://www.w3schools.com/php/php_file_upload.asp then you will get a geojson file to show in ol3. 2) the other one ...


2

I just found this post, from your post here and wanted to share some Python code I wrote that helps select a given feature in a JavaScript app. This code is obviously very specific to the Selenium and Python bindings, but I've got good mileage from it across different browsers, OS and screen resolutions. The idea is that if you Know the real world x/y of ...


2

From the API docs (http://openlayers.org/en/v3.4.0/apidoc/ol.Map.html?unstable=true#forEachFeatureAtPixel): To stop detection, callback functions can return a truthy value. map.forEachFeatureAtPixel(pixel, function(feature) { el.innerHTML += feature.get('Proj_Client') + '<br>'; return true; });


2

The route1Data you are trying to remove is not the original route data that was added. You need to declare your layer outside of vlocation. I modified vlocation to the follow and it adds and removes the layer in my fiddle. var currentRoute; function vlocation(locx, xx) { var vdatax = locx; if (currentRoute) map.removeLayer(currentRoute); if ...


2

At the moment I still prefer OpenLayers2. You can find a nice tutorial here: http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html or even have a look at the "official" openlayers-example: http://dev.openlayers.org/releases/OpenLayers-2.13/examples/wfs-protocol-transactions.html ...


1

You only have one table in the configuration with two of each property (title, queryOptions, etc). The effective result is that only the second property with the same name is evaluated and used. To fix this, you need to add a closing curly brace } to end the configuration object for the first table followed by a comma. Then an opening curly brace { is ...


1

I found a solution here: http://stackoverflow.com/questions/17005784/clustering-markers-on-mapbox-leaflet I used this code to display my markers: var markers = new L.MarkerClusterGroup(); var geoJsonFeature = rodents1; var geoJsonLayer = L.geoJson(rodents1); var map = L.mapbox.map('map','mapbox.streets') .setView([42.35,-71.08],13); ...


1

Not clear if you want all the points to be the same color, or styled according to some property in your data (a category of animal, etc.). Assuming the latter, you could set up your map slightly differently and use the pointToLayer function to return a circle marker for each point: // make an object to lookup a hex color for each category in your data var ...


1

The OpenLayers demo requests a single tile so there's no tiling issues to work around. When individual tiles are requested, as in the case by Leaflet.js, GeoServer renders each tile individually without knowing about the other surrounding tiles. This is most often run into when labels show up for a large feature once in each tile, but your symptoms looks ...


1

the cryptic error is being thrown because query.outFields expects an array query.outFields = ["*"];


1

An idea is: Use the lidar data to classify ground and non-ground points. Then, build a Digital Elevation Model (DEM) from the ground points. Here is a way of doing it. Use the RGB values from the aerial images to color code the lidar point cloud. Here are examples showing how this can be done. Now, it is possible to display the DEM and the color-coded ...



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