maps

Remove US state borders, create outlined regions in ggplot2/geom_polygon

守給你的承諾、 提交于 2019-11-30 08:53:18
I'm mapping the following table of multi-drug resistance trends in the US: MDR by region Using the following code: states_map<-map_data('state') m <- ggplot(ncftrendsort, aes(map_id = region)) + geom_map(aes(fill = ncftrendsort$mdr), map = states_map, color = 'black') + expand_limits(x = states_map$long, y = states_map$lat) + theme_classic() + scale_fill_continuous(name = "% MDR", low = 'white', high = 'black') + theme(axis.title.y = element_blank()) + theme(axis.title.x = element_blank()) + theme(axis.line = element_blank()) + theme(axis.ticks = element_blank()) + theme(axis.text.x = element

cannot evaluate module 'react-native-maps' : Configuration with name 'default' not found

我怕爱的太早我们不能终老 提交于 2019-11-30 08:25:19
A problem occured while building application with 'react-native-maps' here is my setting.gradle file include ':react-native-maps' project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/android') dependencies of android/app/build.gradle file dependencies { compile project(':react-native-maps') compile fileTree(dir: "libs", include: ["*.jar"]) compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" // From node_modules compile 'com.airbnb.android:react-native-maps:0.6.0' } Here is my MainActivity.java

Choropleth maps: changing stroke color in `mouseover` shows overlapping boundaries

丶灬走出姿态 提交于 2019-11-30 07:34:59
I have a problem with mouseover events in choropleth maps. I would like to highlight the boundary so that the user can see the currently selected feature. That all works fine expect that some of the boundaries are much thinner or do not exist at all presumably because they are rendered below the boundary of an adjacent feature. Here is an example: Some of the boundary is correct, other parts are thinner and a third part does not exists at all. The recent NYT maps from Mike Bostock et al solved this problem. What is the solution? Here is my current mouseover code: .on("mouseover", function(d,i)

Google Maps - Street View Static Image

我们两清 提交于 2019-11-30 07:31:16
Is there a way to insert an address into a link and have it bring up the street view? For instance: <img src="http://maps.google.com/?q=ADDRESSHERE&view=streetview" /> Street View now has a static images API. Here's an example: http://maps.googleapis.com/maps/api/streetview?size=640x480&location=43.0635309,141.3253261&fov=120&heading=235&pitch=10&sensor=false Here's the docs: https://code.google.com/apis/maps/documentation/streetview/ 2011: 2017: Might be best to use Google Maps JavaScript API v3 to do it. See documentation and sample code at http://code.google.com/apis/maps/documentation

Improving WPF Canvas performance

自古美人都是妖i 提交于 2019-11-30 06:38:31
问题 I am developing a Maps like application using WPF. I have ~10,000 PathGeometry, Shapes added to the canvas. I have added ScaleTransform and TranslateTransform for zooming and panning controls. The problem I'm facing is, when I zoom or pan, there is slight lag. Is there a way to organize the data so that I handle only the Shapes that are visible? Any hints on making it more efficient will be helpful and appreciated. 回答1: I suggest you have a look at this interesting article, with the concept

Dynamically add data to a javascript map

不问归期 提交于 2019-11-30 06:25:58
问题 Is there a way I can dynamically add data to a map in javascript. A map.put(key,value) ? I am using the yui libraries for javascript, but didn't see anything there to support this. 回答1: Well any Javascript object functions sort-of like a "map" randomObject['hello'] = 'world'; Typically people build simple objects for the purpose: var myMap = {}; // ... myMap[newKey] = newValue; edit — well the problem with having an explicit "put" function is that you'd then have to go to pains to avoid

Rotating a map using leaflet js library

落花浮王杯 提交于 2019-11-30 05:41:05
问题 I need a map rotation feature just like the one available from openLayers 3 (check example below): http://ol3js.org/en/master/examples/drag-rotate-and-zoom.html Is there a way to do the same thing using the leafletjs library, or perhaps, using a custom plugin? 回答1: Leaflet doesn't currently support map rotation, because it wouldn't be supported by its full range of browsers. This also isn't supported by plugins, since rotation logic would need to be implemented in Leaflet core. 来源: https:/

Adding an extra zoom levels in Leaflet Maps

僤鯓⒐⒋嵵緔 提交于 2019-11-30 05:41:04
问题 Im using leaflet to create a photo map, with my own tiles, which works as expected. Im trying to work out how I can prevent the zoom from following this Quadtree type pattern: Zoom Level 0 - Entire map width = 256px; Zoom Level 1 - Entire map width = 512px; Zoom Level 2 - Entire map width = 1024px; And so on... I would like to be able to zoom in say increments of 25% or 100px. An example of 100px increments: Zoom Level 0 - Entire map width = 200px; Zoom Level 1 - Entire map width = 300px;

How can I add programmatically add a PushPin, and could I make it have a custom image?

☆樱花仙子☆ 提交于 2019-11-30 05:32:36
I'm trying to create a map application but the examples I find describes a myMap.Children list that my myMap object does not have :-( I've created a map, pretty much straight forward: <maps:Map Visibility="Collapsed" Name="MyMap" Height="670" Width="400" ZoomLevel="10" Pitch="0" CartographicMode="Hybrid" Margin="30,0" /> So how can I in C# add PushPins, and could these have a image from Assets ? See Nokia's Maps tutorial on " Adding Graphics to a Map control " or see MSDN's " How to add UIElements to a Map control in Windows Phone 8 ". It's mostly around adding you own MapLayer with multiple

How can I get latitude, longitude from x, y on a Mercator map (JPEG)?

不羁岁月 提交于 2019-11-30 05:17:28
I have a Mercator projection map as a JPEG and I would like to know how to relate a given x, y coordinate to its latitude and longitude. I've looked at the Gudermannian function but I honestly don't understand how to take that function and apply it. Namely, what input is it expecting? The implementation I found (JavaScript) seems to take a range between -PI and PI, but what's the correlation between my y-value in pixels and that range? Also, I found this function which takes a latitude and returns the tile for Google Maps, which also uses Mercator. It would seem that if I knew how to inverse