maps

How to open a apple maps application with directions from my ios application

一世执手 提交于 2019-12-03 07:36:31
My aim is to open a map application from ios application with directions, I am able to open maps application but it is not showing directions, i have written the code as follows NSString *mystr=[[NSString alloc] initWithFormat:@"http://maps.apple.com/maps?saddr=Current+Location&daddr=Newyork"]; NSURL *myurl=[[NSURL alloc] initWithString:mystr]; [[UIApplication sharedApplication] openURL:myurl]; Can any one please help me how figure out how to pass parameters to this url and any other? If you mean taking the user to the maps application based on two points, then you can do it like this: Create

Google Maps Store Locator - modify default example

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to create a store locator based off the static csv example used by Google http://storelocator.googlecode.com/git/examples/panel.html I have recreated this example on my own server but if I edit the csv file in any way, even if I just remove some of the rows it returns a blank map. I was hoping I could use this example as a template by replacing the default values in the csv file with my own( http://storelocator.googlecode.com/git/examples/medicare.csv ). There is clearly more to it than I assumed and was hoping someone

Get definite City name in Google maps reverse geocoding

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Using the Google Maps Geocoding API, i'm able to get the formatted address for a particular coordinate. To get the exact city name, I'm doing the following: $.ajax({ url: 'http://maps.googleapis.com/maps/api/geocode/json?latlng='+lat+','+long+'&sensor=false', success: function(data){ var formatted = data.results; var address_array = formatted[6].formatted_address.split(','); var city = address_array[0]; } }); where lat and long are derived using the browser coordinates. My problem is the following: From coordinates 19.2100 and 72.1800 , I

google maps plot route between two points

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have written this innocent javascript code, which lets the user create two markers and plot the route between them. It doesnt work, instead, it gives a weird error: Uncaught TypeError: Cannot read property 'ya' of undefined Can someone suggest me whats wrong here: // called upon a click GEvent.addListener(map, "click", function(overlay,point) { if (isCreateHeadPoint) { // add the head marker headMarker = new GMarker(point,{icon:redIcon,title:'Head'}); map.addOverlay(headMarker); isCreateHeadPoint = false; } else { // add the tail marker

Display a map and highlight certain countries

旧时模样 提交于 2019-12-03 07:32:58
问题 Here's what I'm struggling to do : Display a map on page (Google map or any of it competitors, free is possible...) and highlight certain countries on this map (the list of theses countries would be stored in a variable by exemple). I tried to draw polygons on the map with a geo-json list of (almost) all the countries but it's too heavy. Any ideas ? 回答1: I believe you will need a polygon to do that. http://code.google.com/apis/maps/documentation/overlays.html#Polygons_Overview http://code

JavaScript Source Maps浅析

醉酒当歌 提交于 2019-12-03 07:30:36
阅读目录 有用的链接 Link: 原文链接 译文开始: 对网站进行性能优化对一个最容易的方法就是把JS和CSS进行打包压缩。但是当你需要调试这些压缩文件中的代码的时候,会发生什么?可能会是一场噩梦。但是,不用害怕,即将有一个解决方案到来,它就是Source Maps。 source maps提供一种将压缩文件中的代码映射回源文件中原始位置的方法。这意味着,借助一些软件的帮助,即使你的资源被压缩,你也可以轻易调试你的程序。Chrome和Firefox内置的开发者工具都支持source maps了。 在这篇文章中,你将会学习到source maps的实现原理以及怎么去生成source maps。我们主要是关注JavaScript代码的source maps,但是这些原则同样适用于CSS的source maps。 Source Maps实现原理 顾名思义,source map(源映射)就是包含一堆的信息,可以将压缩文件的代码映射回到源代码。你可以为每个压缩文件指定不同的source map。 通过在压缩文件底部添加特殊的注释,向浏览器表明souce map是可用的。 //# sourceMappingURL=/path/to/script.js.map 该注释通常会被用于生成source map的程序添加。仅当开发者工具支持source map启用了以及打开的时候

使用vertx共享数据 Using Shared Data with Vert.x

匆匆过客 提交于 2019-12-03 07:06:16
Using Shared Data with Vert.x 使用vertx共享数据 Shared data contains functionality that allows you to safely share data between different parts of your application, or 共享数据功能允许你安全的在不同的模块、 different applications in the same Vert.x instance or across a cluster of Vert.x instances. 或不同的应用、或不同的分布式实例之间共享数据。 Shared data includes local shared maps, distributed, cluster-wide maps, asynchronous cluster-wide locks and 共享数据有多个方式:包括本地共享maps、分布式、宽集群的maps、异步的宽集群锁 asynchronous cluster-wide counters. 、异步的宽集群计数器。 Local shared maps Local shared maps allow you to share data safely between different event loops (e.g.

Leaflet.js: How to remove multiple layers from map

可紊 提交于 2019-12-03 06:51:38
I am using Leaflet.js for a map. Now I want to remove added layers from the map. By clicking the input #button all checked checkboxes shall be changed to unchecked and all corresponding layers shall be removed from the map. To remove a layer from the map the id of the layer is needed. This id equals the id of the corresponding checkbox. That's why I use jQuery to get the ids of all checked checkboxes and store their value in an object, here called someObj.idsChecked . When I try to use the stored value val to remove one layer it doesn't work while the console.log displays the wanted value.

Mapping values from two array in Ruby

房东的猫 提交于 2019-12-03 06:47:52
问题 I'm wondering if there's a way to do what I can do below with Python, in Ruby: sum = reduce(lambda x, y: x + y, map(lambda x, y: x * y, weights, data)) I have two arrays of equal sizes with the weights and data but I can't seem to find a function similar to map in Ruby, reduce I have working. 回答1: @Michiel de Mare Your Ruby 1.9 example can be shortened a bit further: weights.zip(data).map(:*).reduce(:+) Also note that in Ruby 1.8, if you require ActiveSupport (from Rails) you can use: weights

Choropleth world map

心不动则不痛 提交于 2019-12-03 06:06:51
问题 I have read so many threads and articles and I keep getting errors. I am trying to make a choropleth? map of the world using data I have from the global terrorism database. I want to color countries on a factor of nkills or just the number of attacks in that country.. I don't care at this point. Because there are so many countries with data, it is unreasonable to make any plots to show this data. Help is strongly appreciated and if I did not ask this correctly I sincerely apologize, I am