openstreetmap

Creating offline map tiles for JMapViewer

旧街凉风 提交于 2019-12-02 17:37:22
问题 I want to create offline map tiles for JMapViewer from an image. How may I be able to achieve it? What are the tools used to generate those tiles? 回答1: There are different ways to reach that goal. All of them make use of an external toolchain: 1. Offline renderer This is a bit more complex, as you need to use a renderer, a map style and OSM data packages to render your own map tiles on your box. A first simple way is to make use of Maperitive as it's very easy to configure and comes with

A* Algorithm for very large graphs, any thoughts on caching shortcuts?

天涯浪子 提交于 2019-12-02 17:14:11
I'm writing a courier/logistics simulation on OpenStreetMap maps and have realised that the basic A* algorithm as pictured below is not going to be fast enough for large maps (like Greater London). The green nodes correspond to ones that were put in the open set/priority queue and due to the huge number (the whole map is something like 1-2 million), it takes 5 seconds or so to find the route pictured. Unfortunately 100ms per route is about my absolute limit. Currently, the nodes are stored in both an adjacency list and also a spatial 100x100 2D array. I'm looking for methods where I can trade

How can I display OSM tiles using Python?

时间秒杀一切 提交于 2019-12-02 16:00:22
I'm in the process of generating tiles with generate_tiles.py and I'd like to write a Python app to display them instead of having a web interface. Does anything like that already exist or is there information somewhere on how to write such an app myself? You can look/edit your map using a desktop application like Tilemill or QGIS (I can't really guess why are you generating tiles if it is not for a web application). Tilestache has an internal webserver you can use for testing, it's easy to get it running just using config files. A few pointers to get you started (or keep you busy for a few

Is there an API for openstreetmap? [closed]

无人久伴 提交于 2019-12-02 14:17:41
I wonder if there is any API I could query OSM data through, for example; Are (lon_1, lat_1) at land or at sea? Or could it be possible to get an island as a well-defined polygon? The only usage I've seen so far has just been tools for rendering OSM data (generating tiles). VikingoS says Reinstate Monica Yes, there is an api and xapi (extended api). I havent used these yet. But there is also the cloudmade api to OSM. I played a bit with the python api. I am not sure, if any of them could help you with your particular problem, but you could search for a coastline near to your point. If your

How to get coordinates on double click on Openstreetmap?

纵然是瞬间 提交于 2019-12-02 13:18:41
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. 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/anushamc/6q2az5xz/ . Briefly, you need to listen for the events on the map by including it in the defaults like:

How to download the OSM tiles for selected part of map

被刻印的时光 ゝ 提交于 2019-12-02 13:03:30
I want to download the map offline for a selected part of the map with single Zoom level with Openlayer OSM layer. I have got the four corner of map i.e display section of a map. But need to get the all tiles image or tiles between that four corners. I have reviewed some example: Openlayers get the image url of the tile under the mouse https://gis.stackexchange.com/questions/167792/how-to-retrieve-the-tile-url-in-openlayers-3 But I need to download the tiles on customer button click. Can anyone please help me. Here's a simple example to save tiles as data urls for later use. If you need saved

Creating offline map tiles for JMapViewer

冷暖自知 提交于 2019-12-02 10:22:01
I want to create offline map tiles for JMapViewer from an image. How may I be able to achieve it? What are the tools used to generate those tiles? There are different ways to reach that goal. All of them make use of an external toolchain: 1. Offline renderer This is a bit more complex, as you need to use a renderer, a map style and OSM data packages to render your own map tiles on your box. A first simple way is to make use of Maperitive as it's very easy to configure and comes with styles. More advanced, you can setup a whole OSM rendering stack (Mapnik, PostgreSQL DB, osmosis, ...) so please

Why isn't my map completely showing?

倖福魔咒の 提交于 2019-12-02 09:59:11
I am using Leaflet to display a map. I just changed my HTML to use jQuery Mobile and Leaflet. I read the documentation for jQuery Mobile, which says I have to add jQuery 1.11. <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> But I was using: <script type='text/javascript' src='js/jquery-3.1.1.min.js'></script> Why there is a such difference?? My problem is the following: Before I moved to jQuery Mobile, my map was fully displaying in its container: <div id="mapId"></div> When I changed my HTML code to use jQuery Mobile, the layout was a disaster until I commented this out: <

Slippy maps for gmaps4rails

情到浓时终转凉″ 提交于 2019-12-02 09:35:01
问题 I thought it would be nice to use OpenStreetMap (or OpenCycleMap) as a map tile provider within the google API. Here is an example of how this is done in plain javascript: <script type="text/javascript"> var element = document.getElementById("map"); /* Build list of map types. You can also use var mapTypeIds = ["roadmap", "satellite", "hybrid", "terrain", "OSM"] but static lists sucks when google updates the default list of map types. */ var mapTypeIds = []; for(var type in google.maps

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

萝らか妹 提交于 2019-12-02 09:30:53
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 is : Logitude, latitude, value -77.85 42.96 9798 There are 0.5 million locations in the input file. I