openstreetmap

How to get coordinates on double click on Openstreetmap?

巧了我就是萌 提交于 2019-12-20 07:48:01
问题 I am using angular-openlayers-directive , I want to get coordinates of the point where I double click. A similar question: Convert point to lat lon But I want to use it in angularjs. 回答1: You should check this example out: http://tombatossals.github.io/angular-openlayers-directive/examples/080-events-propagation-example.html. It shows how you can find the lat-long coordinates for mouseover. Also, here is a fiddle I made showing how you can extend it for double click: http://jsfiddle.net

using XAML Map Control to add a heatmap layer on a map based on OpenStreetMap from C# VS2013 WPF

为君一笑 提交于 2019-12-20 06:31:16
问题 I am trying to use XAML MAP control (https://xamlmapcontrol.codeplex.com/) to add a heatmap layer on a map based on OpenStreetMap from C# VS2013 WPF. I have added the heatmap image to the map by setting north, south, east and west latitude/longitude in MainWindow.xaml. But, I need the locations in the heatmap to be shown in the correct locations with same latitude and longitude in the map as they are created from the input file not just pasting the image to the map. Example, the given input

Integrating OpenStreetMaps with Cordova

一世执手 提交于 2019-12-20 04:20:00
问题 I was wondering if any of you might have any idea how i can use Open Street Maps(OSM) with cordova? Searching for days now.. All i can conclude is that i am not supposed to directly use OSM's API's as their servers will block me out if i have too many calls.. So there are free open sources names like 1.Openlayers 2.Leaflet that allow me to use OSM for free.. however i followed all their tutorials but i cant get the map to show up on the emulator.. Im using Visual studios 2015 community

Import OSM file to PostGis on Windows10

不打扰是莪最后的温柔 提交于 2019-12-20 03:36:14
问题 can you help me with importing planet.osm file to my PostGist db? I am new in this and I found tutorials only for linux. There are some commands, but I do not know how use it ... I will be grateful for some step by step tutorial. I'm using GeoServer if it is important information for us to help me. Thanks for advices. edit: I used osm2pgsql -s -U postgres -d nameofdatabase name.osm but unsuccessful because I have error with no database found. 回答1: I used OGR2OGR to import osm data in pbf

Draw Polyline in JMapViewer [closed]

北城以北 提交于 2019-12-20 03:02:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm working with OpenStreetMap in Java with JMapViewer. I can draw polygon and rectangle using JMapViewer, but how to draw polyline? Thank you. 回答1: You could create your own implementation of a polyline. Below is an example that is based on existing MapPolygonImpl . It is hacky, but there seem to be no method

unaccent() preventing index usage in Postgres

橙三吉。 提交于 2019-12-19 09:47:15
问题 I want to retrieve a way with a given name from an OpenStreetMap database imported into PostgreSQL 9.3.5, the OS is Win7 64-bit. In order to be a bit failure tolerant, I use the unaccent extension of Postgres. My query looks as follows: SELECT * FROM germany.ways WHERE lower(tags->'name') like lower(unaccent('unaccent','Weststrasse')) Query plan: Seq Scan on ways (cost=0.00..2958579.31 rows=122 width=465) Filter: (lower((tags -> 'name'::text)) ~~ lower(unaccent('unaccent'::regdictionary,

How to use leaflet slider along with markercluster in Javascript?

╄→尐↘猪︶ㄣ 提交于 2019-12-19 09:16:28
问题 i am making a map that uses a slider to show or hide markers, and i want to add clustering functionality, each one alone works perfectly, but i want the slider to show the markers, and in case of markers very close to use a cluster. the problem is that both, the individual and the marker clusters are showing, i want the shown markers to cluster not clusters being there all the time <script type="text/javascript"> var sliderControl = null; //creating layers var cities = new L.LayerGroup(); var

How to add only one marker in leaflet map

半世苍凉 提交于 2019-12-19 05:24:10
问题 I am adding marker on map on user click. Problem is that I want only one marker but now whenever I click on map new marker is added. I am trying to remove it but nothing happens: var marker; map.on('click', function (e) { map.removeLayer(marker) marker = new L.Marker(e.latlng, { draggable: true }); marker.bindPopup("<strong>" + e.latlng + "</strong>").addTo(map); marker.on('dragend', markerDrag); }); 回答1: Instead of using .on to capture and handle the event, you could use .once . That way the

how to get points return from OpenLayers.Control.DrawFeature

你离开我真会死。 提交于 2019-12-19 04:02:49
问题 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" debug="true"> <head> <title>Mapping project</title> <link rel="stylesheet" href="default/style.css" type="text/css"> <link rel="stylesheet" href="example/style.css" type="text/css"> <script src="js/jquery-1.8.2.js"></script> <script src="OpenLayers/OpenLayers.js"></script> <script type="text/javascript"> var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform from WGS 1984 var toProjection = new OpenLayers.Projection

How to add two geoJSON feature collections in to two layer groups

此生再无相见时 提交于 2019-12-19 03:40:41
问题 I have two geoJSON feature collections that I need to add to the map, and I also want them to be toggled on and off via the layer visibility controllers as shown in http://leafletjs.com/examples/layers-control.html how can I do this? 回答1: There is also a very good tutorial on the usage of L.GeoJSON , Leaflet's GeoJSON layer, which can be found here: http://leafletjs.com/examples/geojson.html and here is the reference for L.GeoJSON : http://leafletjs.com/reference.html#geojson You already