openstreetmap

Android custom control to display map tiles [closed]

谁说我不能喝 提交于 2019-11-29 05:19:04
I have on my server map tiles sorted on a folder structure like OpenStreetMap (OSM) uses. I need to be able to display these tiles, zoom in/out, pan and rotate the map. I wouldn't start from the scratch to create a new control. I've seen OsmDroid but I didn't find a way to set my own non vectorized tile source. I am open to any suggestions. I would first try to check out their source code to get an understanding of how they did it. Here is the link to their source codes. To be more precise I think that this is the file you are looking for. 来源: https://stackoverflow.com/questions/4793290

Map Tile Caching for Offline Viewing

核能气质少年 提交于 2019-11-29 02:26:57
问题 I'm trying to build an application that will use open source maps from Open Street Maps (though the concept should be applicable to any map provider). The application will enable the user to specify a number of waypoints along a route prior to departure. Because I don't have a data plan for my cell phone (and because rambling in the countryside rarely gives you a good connection), I want to be able to pre-load the relevant map tiles for the waypoints and/or route before departure so that maps

Open Street Maps with Android Google Maps Api v2

痴心易碎 提交于 2019-11-28 21:27:31
Is it possible to use an open street map provider with the new Google Maps V2 Api on Android? If so can you provide an example, or documentation? I have looked quickly at the docs and found UrlTileProvider() , so it looks likely this is possible. Bonus: Is simply using the MapFragment class with OSM tiles still bound by the Google Maps TOS? You need to extend the UrlTileProvider class so you can define the URL for OSM tiled maps and add a tile overlay like that : MyUrlTileProvider mTileProvider = new MyUrlTileProvider(256, 256, mUrl); mMap.addTileOverlay(new TileOverlayOptions().tileProvider

Adding Overlay to OSMDROID

∥☆過路亽.° 提交于 2019-11-28 19:43:48
I have been struggling with this long time. I am trying to add Overlay on my map. I am using the open source OSMdroid. but all I get by the example is a straight red line from one corner to another. My target is to add some icon where my geoPoint is set. here is my code: package osmdemo.demo; import java.util.List; import microsoft.mappoint.TileSystem; import org.osmdroid.tileprovider.tilesource.TileSourceFactory; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapController; import org.osmdroid.views.MapView; import org.osmdroid.views.MapView.Projection; import org.osmdroid.views

How to add markers bulk in leaflet?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 18:52:17
I have an array with ~30k elements and I need to create map with markers for each of them. I use markerclusters and trying to optimize adding moment. for (var i = 0; i < myItems.length; i++) { var item = myItems[i]; marker = new L.marker([item[2],item[3]], { icon: mapOpts.myIcon }).bindPopup(item[1]); markers.addLayer(marker); } Even Google Chrome takes about 40 sec to do this loop. I don't want to see FF's result. Is there any way to optimize adding many elements to map? var array = []; for (var i = 0; i < myItems.length; i++) { var item = myItems[i]; marker = new L.marker([item[2],item[3]],

How do I do geocoding and routing with OpenStreetMap? [closed]

丶灬走出姿态 提交于 2019-11-28 16:43:06
Because Google Maps API is not available in Israel (see here ) I want to use OpenStreetMap. I'm confused by all the different ways to do geocoding, i.e. finding lat,long for an address. I'm also looking for the best way to do routing, i.e. display a route between two locations, using OSM. I'm looking for JavaScript on the client and .NET on my server. I'm also looking for a solution that will work with names in Hebrew, but I do not think this is a limitation. Routing MapQuest open offers an Open Directions Service and an Open Guidance Service . Additional information about Routing in

Unable to display only the points within a specific range (circle) using the .getBounds() function (Leaflet)

丶灬走出姿态 提交于 2019-11-28 14:32:52
I am trying to display a certain amount of points within a specific range, that is within a circle . But when using the .getBounds() function for comparison to see whether the point is within the bound, i get some points outside it as shown in the screenshot below: Map Screenshot The code currently using to check if the point is within the circle bound is below: echo ' var mark = L.marker([' . $r->coordinates[0]->longitude . ',' . $r->coordinates[0]->latitude . ']); if(circle.getBounds().contains(mark.getLatLng())){ mark.addTo(map); mark.bindPopup("'.$info.'"); } '; I am looping into an array

OSM to Google Maps polygons

霸气de小男生 提交于 2019-11-28 13:48:56
I want to draw a city district area on Google Maps using Polygon class and an array of lat/lng coordinates. OpenStreetMap provides me all data I need — if I type some district name I can get useful data in OSM XML format, for example OSM drawn polygon of “Vecmilgravis” district in Riga, Latvia and it's data in OSM XML format . The problem is all those node nodes are sorted in some weird order, so if I just extract all lat and lng pairs and make an coordinates array for Google Maps Polygon class I see not what I've expected: Markers are displayed correctly 'cos coordinates order is not

D3.js + osm geojson = black rectangle

坚强是说给别人听的谎言 提交于 2019-11-28 11:13:38
问题 I am trying to visualize russians regions. I got data from here, validate here and all was well - picture. But when I try to draw it, I receive only one big black rectangle. var width = 700, height = 400; var svg = d3.select(".graph").append("svg") .attr("viewBox", "0 0 " + (width) + " " + (height)) .style("max-width", "700px") .style("margin", "10px auto"); d3.json("83.json", function (error, mapData) { var features = mapData.features; var path = d3.geoPath().projection(d3.geoMercator());

How can I highlight a MapMarkerDot in Openstreetmap?

独自空忆成欢 提交于 2019-11-28 11:12:25
问题 I used code from http://svn.openstreetmap.org/applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java to get a map up and running for my swing application. I added a few MapMarkerDot to indicate some points in my map and used how can i get the mouse click position from my JMapViewer world map to identify whether a point has been selected but how can I actually show that a particular MapMarkerDot has been selected? I want to add some kind of border similar to http://bikes