openstreetmap

Global map tiles disappear past zoom level 19

馋奶兔 提交于 2019-12-02 09:28:34
问题 I use OpenStreetMap with Leaflet.js. I have a map with an indoor picture on it. The problem is when I zoom in, streets disapears. Do you know anything that can solve this plz? Tricks or tips! EDIT : // Load the Map this.map_ = L.map($(selector)[0], { center: [ 48.8459382, 2.2863024, ], maxZoom: 24, zoom: 20, }); 回答1: I guess you have used map.options.maxZoom at a high number to let the user zoom to see your indoor image details. However, OSM tiles are not available past zoom level 19, so the

Slippy maps for gmaps4rails

我只是一个虾纸丫 提交于 2019-12-02 06:50:35
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.MapTypeId) { mapTypeIds.push(google.maps.MapTypeId[type]); } mapTypeIds.push("OSM"); var map = new google

Leafletjs: Dynamically changing map feature colors

房东的猫 提交于 2019-12-02 05:15:14
问题 It's been a few days now that I have been looking for a way to be able to dynamically change the colors of different map features such as Roads, Water, Buildings, Background etc using leaflet.js. I know we had this option in Mapbox using the Mapbox GL. But I am wondering if this can be achieved using the leaflet.js library. Any help/workaround would be highly appreciated. Thanks 回答1: By default Leaflet can render only raster tiles (i.e. plain images, which you cannot easily modify) and vector

Invisible vectors? Combining d3.tile(), d3.zoom() and TopoJSON vectors

微笑、不失礼 提交于 2019-12-02 02:30:34
问题 I've made effective D3 maps using rasters ( d3.tile and map libraries) and vectors (TopoJSON in SVG shapes). But I hit a bug when I combine them. I followed Mike Bostock's raster-and-vector examples, especially his "Raster & Vector III", which changes the transform and stroke width to update how the vectors are displayed. My map almost works perfectly. However, upon loading, only the raster tiles are displayed; the vectors are invisible: But as soon as I trigger the d3.zoom event (by panning

Import OSM file to PostGis on Windows10

谁说胖子不能爱 提交于 2019-12-02 02:13:33
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. I used OGR2OGR to import osm data in pbf format on Windows (Windows 10, Posgres 9.6 with Postgis 2.3). You can use OGR2OGR from the "OSgeo42 shell",

Draw Polyline in JMapViewer [closed]

房东的猫 提交于 2019-12-02 01:56:03
I'm working with OpenStreetMap in Java with JMapViewer. I can draw polygon and rectangle using JMapViewer, but how to draw polyline? Thank you. 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 in JMapViewer to add lines. import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.geom.Path2D; import java.util.ArrayList; import java.util.List; import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.openstreetmap.gui.jmapviewer

OpenStreetMap in ASP.NET

风流意气都作罢 提交于 2019-12-01 23:18:11
问题 I'm interested in using OpenStreetMap in a web application developed using ASP.NET. Anyone knows if there is a control, library or wrapper for using OpenStreetMap in ASP.NET? (C#, not using Javascript). Thanks in advance. 回答1: I'm not sure whether they have any ASP specific tools, but Cloudmade have lots of tools & API you can use to get OpenStreetMap into your app. It's mostly done on the client though through JavaScript, so I don't think you'll find much in the way of C# tools. I could be

how to add more marker in osm map in android

久未见 提交于 2019-12-01 22:53:57
I've found a solution how to map balloon in openstreet map I customize osmbonuspack according to my need is work fine but is only show one map. How do I add more then one marker in this code which I paste below? My output URL is work fine just tell me how do I add text in image bubble and also how I add more then one marker in map? import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.osmbonuspackdemo.R; public class NavigationActivity extends Activity { protected MapView map; protected ItemizedOverlayWithBubble

OpenStreetMap in ASP.NET

笑着哭i 提交于 2019-12-01 21:06:15
I'm interested in using OpenStreetMap in a web application developed using ASP.NET. Anyone knows if there is a control, library or wrapper for using OpenStreetMap in ASP.NET? (C#, not using Javascript). Thanks in advance. I'm not sure whether they have any ASP specific tools, but Cloudmade have lots of tools & API you can use to get OpenStreetMap into your app. It's mostly done on the client though through JavaScript, so I don't think you'll find much in the way of C# tools. I could be wrong though... BruTile is a C# library for displaying a slippy map. It can be used on the web, displaying

User-Agent for osmdroid

吃可爱长大的小学妹 提交于 2019-12-01 18:35:35
I tried to put the user agent (cf https://github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid-in-your-app ), but when I put the line OpenStreetMapTileProviderConstants.setUserAgentValue(BuildConfig.APPLICATION_ID); Android studio is telling me that setUserAgentValue is depreciated. What can I do to solve that ? For now when I run the app I have a grid with no map. Thanks you very much in advance ! spy It's deprecated because it's been moved to another location which consolidates all configuration settings for osmdroid. Try the following Configuration.getInstance()