maps

I get an error saying socket bind failed for: /var/run/renderd/renderd.sock if i am a regular user else everything works fine?

懵懂的女人 提交于 2019-12-04 02:59:15
问题 I am trying to manually build a map server as per instructions on switch2osm.org. I have configured everything. I have a database mayank owned by user mayank and I am trying to use renderd but i get this error socket bind failed for: /var/run/renderd/renderd.sock. Now if i switch to root and do the same it runs perfectly no direct permission issues because i have changed the owner for the directories recursively. But there might be some intermediate permission issues. I can not run it as root

How can I generate an image in Ruby without external dependencies?

被刻印的时光 ゝ 提交于 2019-12-04 01:54:42
I want to implement heat maps over Google maps with my own data beyond my Rails application. To do this I need to generate overlay images for each map coordinate (tile) based on my data. I found how to generate that using ImageMagick but I do not want to depend on this, because I plan to distribute my application in several places, so I would like to do this using only the Ruby language. Note that I need only to plot points in different colors over an small transparent square. I think chunky_png or oily_png will be your best bet on this. It has no external dependencies on ImageMagick, and

Google Maps API - Resizing generates blank white space

♀尐吖头ヾ 提交于 2019-12-04 01:50:47
问题 I'm working on what it looked to be like a very simple feature which is causing a little bit of a headache. I work with a GIS and we integrate it with Google Maps. One of the clients requested to be able to open a separate pop up window showing only the map. Opening the window wasn't a problem, but as I try to expand the width of the IFrame which contains the map, in order to fit the window size, the actual map image stays with the same size, and a white space fills the remaining space. I

Get all Values from a Map for some Keys in Java/Guava?

徘徊边缘 提交于 2019-12-04 01:41:52
Is there a smart way to get all Values from a Map given some Keys? I would like a method like this: public static <K, V> Collection<V> getAll(Map<K, V> map, Collection<K> keys) or is already a guava way? This depends on how you want the method to work. For example, should elements in keys that aren't in map A) just be ignored or should they B) be represented as null in the returned values collection or should that C) be an error? Also consider whether you want a live view or a separate collection containing the values. For A , my preference would be: Collection<V> values = Collections2

Override MapView Tile Source?

为君一笑 提交于 2019-12-04 00:18:22
Is it possible to override the source of the tiles that the Android MapView displays? I have some map imagery tiles in a database, and would like to use the Google maps MapView to look at them. Also, if this is not possible... does anyone know of a MapView that does allow this? (OpenStreetMap API... MapQuest API... etc) I am looking for a solution that does not rely on the GPL/LGPL. You can use some of these libraries: osmdroid , mapsforge . Both of them provides interface to some internet map databases and allows to create your own maps provider. They allows you to have (and handle) your

How can I change the default loading tile color in LeafletJS?

时间秒杀一切 提交于 2019-12-03 23:21:22
问题 By default, when leafletJS is loading a map, the background tiles are all grey. I'd like to change that color to be black (or any other arbitrary color). How can I go about doing this? 回答1: It's controlled by the below css rule in the file 'leaflet.css': .leaflet-container { background: #ddd; } so you just need to change this rule. 来源: https://stackoverflow.com/questions/13851888/how-can-i-change-the-default-loading-tile-color-in-leafletjs

D3js cartography: auto-focus on geographic area ? (svg canvas, zoom scale, coordinate translation)

吃可爱长大的小学妹 提交于 2019-12-03 22:38:57
问题 I processed SRTM raster data to generate shapefiles -> geojson -> topojson so I may feed D3js with a suitable format. The result look like this (the blue area is my oversized svg canvas): Given geographic area of interest geo-borders (west border, North, East, South) and center : // India geo-frame borders in decimal ⁰ var WNES = { "W": 67.0, "N":37.5, "E": 99.0, "S": 5.0 }; // India geo-center : var latCenter = (WNES.S + WNES.N)/2, lonCenter = (WNES.W + WNES.E)/2; // HTML expected frame

how to clear leaflet map of all markers and layers before adding new ones?

半世苍凉 提交于 2019-12-03 22:07:53
i have the fallowing code: map: function (events) { var arrayOfLatLngs = []; var _this = this; // setup a marker group var markers = L.markerClusterGroup(); events.forEach(function (event) { // setup the bounds arrayOfLatLngs.push(event.location); // create the marker var marker = L.marker([event.location.lat, event.location.lng]); marker.bindPopup(View(event)); // add marker markers.addLayer(marker); }); // add the group to the map // for more see https://github.com/Leaflet/Leaflet.markercluster this.map.addLayer(markers); var bounds = new L.LatLngBounds(arrayOfLatLngs); this.map.fitBounds

How to find a geographic point between two other points

允我心安 提交于 2019-12-03 22:05:55
问题 For my application I have to find the position of a point on Google map knowing only that it's located between 2 other points and the time (in ms) when the coordinates have been caught. In my code, assumed A and B as the points given and X as the point to find, I: calculate distance between A and B basing on time I found out the speed (in micro degrees /ms) to travel from A to B I found the distance from point A and point X (using time and speed) using similar triangle's rule, I calculate

iOS Maps draw route (line) between several points (geopoints) [closed]

▼魔方 西西 提交于 2019-12-03 22:01:01
I have to solve a problem. I have stored on the server a lot of coordinates, they represent a course, and I have to draw the course on the map, must support iOS6 and iOS7 So, should be able to draw something like this Can anyone help me with solutions or ideas to better achieve this? You can do like that : - (void)viewDidLoad { [super viewDidLoad]; // center map CLLocationCoordinate2D startCoord = CLLocationCoordinate2DMake(47.081012, 2.398781); MKCoordinateRegion adjustedRegion = [self.mapView regionThatFits:MKCoordinateRegionMakeWithDistance(startCoord, 3000000, 3000000)]; [self.mapView