maps

SpringBoot(二) -- SpringBoot配置

℡╲_俬逩灬. 提交于 2019-12-05 17:51:43
一.配置文件   SpringBoot可以使用两种类型的配置文件(文件名固定):   application.properties   application.yml   配置文件的作用就是来修改SpringBoot自动配置的默认值:SpringBoot在底层都给我们配置好了所有的配置信息   yml:YAML(YAML Ain't a Markup Language):新型配置文件.以前的配置文件大都使用到的是"xxx.xml"文件,YML以数据为中心,更适合做配置文件; 二.YML语法   1.基本语法     k:(空格)v --表示一对键值对(空格必须有);     以空格的缩进来控制层级关系: 只要是左对齐的一列数据,都是同一层级的,且属性和值都是大小写敏感的   2.值的写法     字面量: 普通的值(数字,字符串,布尔): key: value,字符串不用加引号:       ""字符串:不会转义字符串中的特殊字符,特殊字符会作为本身想要表示的意思         "zhangsan \n lisi" 输出: zhangsan 换行 lisi       ' '字符串: 特殊字符不会进行转义,特殊字符最终只是一个普通的字符串数据     对象,Map(属性和值)(键值对):       k: v:    //在下一行来写对象的属性和值的关系,要用空格控制好缩进   

Android: align_left aligns to the center

半城伤御伤魂 提交于 2019-12-05 17:42:49
I have a fragment that contains a google map: <com.google.android.gms.maps.MapView android:id="@+id/mapview" android:layout_width="match_parent" android:layout_height="match_parent" map:cameraZoom="13" map:mapType="normal" map:uiZoomControls="false" map:uiRotateGestures="true" map:uiScrollGestures="true" map:uiZoomGestures="true" map:uiTiltGestures="false" /> the map takes up the entire screen and has mylocation enabled: map.setMyLocationEnabled(true); The following code should align the mylocation button to the top-left of the screen: // Get the mylocation button view View locationButton = (

最小生成树模板

谁都会走 提交于 2019-12-05 16:20:10
洛谷P3366 //Kruskal 贪心思想,每次都从权值最小的边开始选,配合并查集得到最小生成树 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int maxn = 200000+5; struct Node { int u,v,w; }; Node node[maxn]; int n,m; int fa[5005]; int ans,cnt; int flag=0; bool cmp(Node a,Node b) { return a.w<b.w; } int find (int x) { while(x!=fa[x]) //让x和x的父亲变成他的父亲的父亲 x=fa[x]=fa[fa[x]]; //直到找到祖先才结束循环(x==fa[x])就意味着找到爹了 return x; } void kruskal() { sort(node,node+m,cmp); //将全部边变从小到大排序 int eu,ev; for(int i=0;i<m;i++) { eu=find(node[i].u),ev=find(node[i].v);//找祖先,祖先相同说明已经连通,这条边没有用 if(eu==ev) continue; ans+=node[i].w; fa

Maps for China - which is correct, Satellite or default street map ? does that mean geocoding results are wrong?

大兔子大兔子 提交于 2019-12-05 15:09:48
So it is known that the maps, either the regular street map or the satellite map, does not line up correctly in specific parts of China. So which map lines up correctly, the satellite map or the default street map? Some sites suggest that the satellite map is correct. But the Google Geocoder is placing locations correctly on the google street map and not on the satellite map. So if the satellite map is considered to be correctly aligned with China, does that mean that the Google Geocoder is also returning incorrect coordinates for locations in China? I have not been able to find any official

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

試著忘記壹切 提交于 2019-12-05 14:14:34
问题 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? 回答1: 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

Is there an offline Map layer available for Leaflet?

白昼怎懂夜的黑 提交于 2019-12-05 10:29:19
Is there an offline Map layer available for Leaflet? I don't need in detail, but basic geometry would be sufficient. For sure you can set up your own offline map (raster tiles and/or vector shapes). The difficulty or out-of-the-box availability depends on what kind of information and level of details you want. GeoJSON: The easiest is if you need just world countries borders with little detail, just to get the outline. In that case, you can find GeoJSON files on Internet that contain that data for a few hundreds kB (the weight of a single normal big image), e.g. https://github.com/johan/world

Open iOS6 Apple Maps app from a link in a UIWebView

╄→尐↘猪︶ㄣ 提交于 2019-12-05 09:18:19
If I display a link to a map in a webpage <a href="http://maps.apple.com/?q=Pricketts+Hill+Southampton+Hampshire+SO32+2JW&ll=50.913127,-1.191398">Location</a> it opens the native iOS6 Apple Maps app when clicked in the standard iPhone Safari browser. When I display the same webpage in a UIWebView inside my app and then click the link, my delegate method - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { is called, and the parameters are url=http://maps.apple.com/?q=Pricketts+Hill+Southampton+Hampshire

How can I prevent popup showing by clik on marker in Leaflet?

心已入冬 提交于 2019-12-05 08:35:45
I want popup doesn't show itself when I click on Leaflet marker. I cannot use clickable : false because I it will make the markers "act as a part of the underlying map" and this is unacceptable for me. I tried the next code marker.on('click', function(event) { event.originalEvent.preventDefault(); }); without any results. What is the right way to prevent popup showing without using clickable : false property of marker object. Edit 1: All I need is to open all the popus on the map by clicking one custom button, still I don't want popup show itself after I click on the particular marker Just don

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

穿精又带淫゛_ 提交于 2019-12-05 08:19:31
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . 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? 回答1: You can

zoom mapView to a certain bounding box on osmdroid

南楼画角 提交于 2019-12-05 08:07:06
I want to use the zoomToBoundingBox method to zoom a map to a specific bounding box. The method does nothing but display the map on zoom level 0. In the mapView.java source code I found this: /** * Zoom the map to enclose the specified bounding box, as closely as possible. * Must be called after display layout is complete, or screen dimensions are not known, and * will always zoom to center of zoom level 0. * Suggestion: Check getScreenRect(null).getHeight() > 0 */ I checked getScreenRect(null).getHeight() > 0 and it gives me false. How do you complete display layout programmatically? What can