openstreetmap

Disable scrolling in Osmdroid map

北慕城南 提交于 2019-12-08 04:42:29
I have an Osmdroid MapView. Even though I have set mapView.setClickable(false); mapView.setFocusable(false); the map can still be moved around. Is there a simple way to disable all interactions with the map view? I've found a solution. You need to handle the touch events directly by setting a OnTouchListener . For example, public class MapViewLayout extends RelativeLayout { private MapView mapView; /** * @see #setDetachedMode(boolean) */ private boolean detachedMode; // implement initialization of your layout... private void setUpMapView() { mapView.setOnTouchListener(new OnTouchListener() {

OSM - Show current location with custom icon

杀马特。学长 韩版系。学妹 提交于 2019-12-08 04:37:37
问题 Can anyone tell me how can I show my current location on OSM map with custom icon? 回答1: With default person icon :: MyLocationNewOverlay myLocationoverlay = new MyLocationNewOverlay(mapView); myLocationoverlay.enableFollowLocation(); myLocationoverlay.enableMyLocation(); mapView.getOverlays().add(myLocationoverlay); With custom icon :: MyLocationNewOverlay myLocationoverlay = new MyLocationNewOverlay(mapView); myLocationoverlay.enableFollowLocation(); Drawable currentDraw = ResourcesCompat

Flash library for OpenStreetMap

给你一囗甜甜゛ 提交于 2019-12-07 15:26:31
问题 Is there a library in Flash to access and draw vector data from OpenStreetMap? 回答1: See Halcyon. It is an OSM rendering engine written in flash. It downloads and renders vector data, not pre-rendered tiles. 回答2: One option would be to use OpenLayers, which can draw OpenStreetMap data. One example use of this is the data layer on the OpenStreetMap website (Click the blue + in the top right and the check data). Alternatively you could look into the upcoming replacement to the current online

How can I automatically plot markers for addresses on a Google or OpenStreetMap?

こ雲淡風輕ζ 提交于 2019-12-07 13:48:32
问题 I have a list of UK addresses and would like to plot them on a google or openstreetmap (I dont mind which). Is there a way to render a batch of addresses on a map with dots to represent the location (rather then the standard marker). To make things slightly more complex, I would like to change the colour and size of some markers. The data source is a street address including postcode and a marker type (size, color). Does anyone know of a site, script, process to achieve this? The geographic

Parsing osm.pbf data using GDAL/OGR python module

断了今生、忘了曾经 提交于 2019-12-07 12:59:32
问题 I'm trying to extract data from an OSM.PBF file using the python GDAL/OGR module. Currently my code looks like this: import gdal, ogr osm = ogr.Open('file.osm.pbf') ## Select multipolygon from the layer layer = osm.GetLayer(3) # Create list to store pubs pubs = [] for feat in layer: if feat.GetField('amenity') == 'pub': pubs.append(feat) While this little bit of code works fine with small.pbf files (15mb). However, when parsing files larger than 50mb I get the following error: ERROR 1: Too

how to add 2+ layers in a group?

£可爱£侵袭症+ 提交于 2019-12-07 11:02:22
问题 How can I add two or more layers in a group so that I can see them in layerswitcher categorised and can select or unselect all !? Here is the code I have: var line_1 = new OpenLayers.Layer.Vector(" Line no - 1", { visibility: true, projection: dproj, strategies: [new OpenLayers.Strategy.Fixed()], style: {strokeWidth: 4, strokeColor: "#ff0000", strokeOpacity: 1}, protocol: new OpenLayers.Protocol.HTTP({ url: "lines/en/line_1.kml", format: new OpenLayers.Format.KML }) }); var line_2 = new

Android draw route on openstreetmap [closed]

 ̄綄美尐妖づ 提交于 2019-12-07 07:54:56
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I am looking for a way to draw a route path on openstreetmap in my android app. I only have the start and end points, however do not want just a straight line. Any ideas on how I could do this? 回答1: For obtaining a route you can use one of the various online routers for OSM. Many

Overlaying shapefiles or raster over interactive maps

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 05:40:41
问题 I'm using R, and I want to overlay some raster data (e.g. a temperature map from a model) over an interactive map which allows panning and zooming. Ideally, I'd like to overlay over Google Maps or OpenStreetMaps. The input data can be in shapefiles, KML, raster data or whatever comes in handy. I know I can easily do this non-interactively using either googleVis , ggmap or RgoogleMaps . But I do not want to use tiles, I want interaction ! Zooming, panning etc., directly from the browser.

open street maps (osmdroid) shows grey tiles not map in PC

北城余情 提交于 2019-12-07 05:20:57
问题 I am using osmdroid to get open Street maps in my app. I had build my project with the needed jars (osmdroid) and added all needed permissions in the manifest. But when I try to debug my app in android emulator (adt eclipse) I am not able to see the map, only grey tiles. My project is working fine because if I debug in a smartphone I am able to see the map, the problem is only with the emulator. I have done some research but I only found information of google maps solutions but not open

Osmdroid and Pinch

佐手、 提交于 2019-12-07 04:27:40
问题 I'm developing an app using osmdroid (3.0.8). When I zoom using two fingers in and out, the zoom starts from the center of the map, not from the middle of the two fingers (using MapView.setMultiTouchControls(true); ). I've tried to implement the pinch (pinch) but with bad results. I've read other similar questions but without finding a good solution. Note: I MUST use OSM, and not other solutions 回答1: Osmdroid 3.0.10 includes support for zooming at the location you pinched at. The samples also