maps

d3.js fisheye distortion on map

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 13:05:28
I'm trying to distort a d3.geo.path() map with the fisheye.js plugin ( https://github.com/d3/d3-plugins/tree/master/fisheye ). To distort an object the plugin needs x & y attributes. In the d3.js wiki it says: A projection function takes a two-element array of numbers representing the coordinates of a location, [longitude, latitude], and returns a similar two-element array of numbers representing the projected pixel position [x, y]. For example, a rudimentary spherical Mercator projection: https://github.com/mbostock/d3/wiki/Geo-Paths So the distortion should be possible, I just can't wrap my

How to switch between multiple map legends with leaflet.js?

笑着哭i 提交于 2019-12-08 12:18:16
问题 I`m using leaflet.js library to create multiple maps based on statistical data. Each map displays different range of values so it would be nice to change legend when user change map. I found similar example in this question, but I need to switch between more than two layers. I try simply add more "if" statments and logical operators in code, but it doesn`t work right: map.on('baselayerchange', function (eventLayer) { if (eventLayer.name === 'Agricultural') { map.removeControl(VODlegend ||

how to select a specific route on leaflet?

给你一囗甜甜゛ 提交于 2019-12-08 12:10:07
问题 I want to draw a map with few routes drawn on it. I want to have a dropbox with numbers 1,..,n when an item in the dropbox is chosen, the corresponding route is highlighted on the map. I have started using "leaflet". 1) how do i choose with js a specific feature (e.g. line) on map? I saw how to filter from a features collection, but not how to select from all features on the map (say by property X) $('select[name="dropdown"]').change(function() { var item = $(this).val(); alert("call the do

Dynamically change the radius of circle-based extrusion with Mapbox

早过忘川 提交于 2019-12-08 11:54:06
问题 I want to dynamically adjust the radius of circle-based extrusions with Mapbox based on the zoom level. I have used for a toy dataset the solution provided by @stdob-- here and for which the JS Fiddle is available here. The problem with that solution is that it is computationally very expensive and with my real dataset (more than a million point) this is not a viable solution. I therefore thought about using queryRenderedFeatures() as suggested in the comments of the previous SO posts.

Google Maps Screen Control

微笑、不失礼 提交于 2019-12-08 11:23:32
I am using google maps on my project. I want to put arrow to screen if marker not showing on the screen. How can I control screen? Actually, the answer for your question is in lakshman.pasala comment, but its implementation is a little bit complex (TLDR). So, best way to get Google Maps Screen Control - is implement custom view which extends MapView class. In that case you can get full control of drawing on view canvas. To do that you should override dispatchDraw() method (because MapView extends FrameLayout which is ViewGroup ) and implement within it arrow drawing. Something like that:

Google Maps API : multiple direction/route on same map

风格不统一 提交于 2019-12-08 10:50:16
问题 I have a problem displaying several routes on the same Google map. I have a position list that I get from my controller (in this form). (7) [{…}, {…}, {…}, {…}, {…}, {…}, {…}] 0: arriveeLat: 48.784 arriveeLng: 2.40735 departLat: 48.9016 departLng: 2.29873 I would like to make all the routes are displayed on the same map. Currently, only one is displayed (the last one probably) var map; function initMap() { var directionsService = new google.maps.DirectionsService; var directionsDisplay = new

ESRI silverlight print map without using print task

坚强是说给别人听的谎言 提交于 2019-12-08 10:08:41
问题 I have a silverlight application which different panels, One of the panel contains the ESRI map, I want to print what is coming on the map panel, It's more like a print screen for map (but it should not include rest of the controls of the client application). On investigation I found that we can use PrintTask but it uses GP server. I do not want to invoke the ESRI service for print. Is there any other way to print what is coming on the screen (inside the map panel) in the silver light? Atul

How to get raw traffic flow data

一笑奈何 提交于 2019-12-08 10:00:58
问题 Creating application to use car count data from traffic. How do I access the live google maps, waze or bing maps data? 回答1: The Azure Maps platform has raw traffic data you can access for analysis purposes (I have been working with several others who are doing this). There are two approaches. The first is to use the Traffic flow segment API: https://docs.microsoft.com/en-us/rest/api/maps/traffic/gettrafficflowsegment The second is to use the traffic flow tiles. https://docs.microsoft.com/en

Calculate nearest point of KML polygon for iPhone app

女生的网名这么多〃 提交于 2019-12-08 08:41:21
问题 I have a series of nature reserves that need to be plotted, as polygon overlays, on a map using the coordinates contained within KML data. I’ve found a tutorial on the Apple website for displaying KML overlays on map instances. The problem is that the reserves vary in size greatly - from a small pond right up to several hundred kilometers in size. As a result I can’t use the coordinates of the center point to find the nearest reserves. Instead I need to calculate the nearest point of the

How to use OpenLayers with MapGuide source

心不动则不痛 提交于 2019-12-08 07:34:11
问题 Basically I want the following example http://openlayers.org/dev/examples/mapguide.html to worj against this WMS datasource "http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&"; All I have done so far is changing the url. var url = "http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&"; I found the following online docs http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapGuide-js.html but I dont know where to get the correct values for these