问题标签 [geo]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
144 浏览

django - 我应该如何在 GeoDjango 中为 2000 年人口普查数据设置 LayerMapping() 的 source_srs 参数?

我已经从http://www.census.gov/geo/www/cob/z52000.html#shp下载了 2000 个人口普查邮政编码多边形数据作为 .shp 文件

根据 GeoDjango 文档,我的数据集需要“整数 SRID、WKT 或 PROJ.4 字符串”。
http://docs.djangoproject.com/en/dev/ref/contrib/gis/layermapping/#layermapping-api

我搜索了相关参数,我只能找到以下消息,其中提到了 4269 和 2163。两者都不起作用。 http://old.nabble.com/RE%3A-SRID-and-unprojected-%28Census%29-data-p15996981.html

注意:当我将 .shp 文件作为 DataSource 打开并尝试查看图层的 srs 属性时,我得到的结果如下:

那么,我应该为 source_srs 使用什么值?

0 投票
4 回答
871 浏览

database - 是否有任何免费/付费的地理数据服务可用?

我需要为一个应用程序创建两个下拉列表。一个显示世界上所有国家,另一个在第一个下拉列表中填充所选国家的所有城市。是否有任何提供此类信息的网络服务或数据库?

0 投票
2 回答
9125 浏览

android - How to send "geo fix" command to real device of Android?

First,thank you for your attention to my question

I'm planning to design an Android GPS locating application

here are my difficulties and situations

(1)my computer hardware has been out of date for a long time and running an android emulator for debugging is really time-costing,thus i bought a real device(android cellphone) one week ago,in the aim of replacing emulator during debugging

(2)i know how to send location datas to an emulator via "DDMS/Emulator Control/Location Controls",but it is disabled for a real device

(3)i am programming indoor,thus using physical gps locating function is not acceptable(even if i turn on "a-gps")

(4)i have found another topic here: Android mock location on device? however,i can't open the detail links,like "Andrews link"," http://dehuysser.appspot.com/blog/android-developer-shell-released"

I guess these web sites are forbidden by my country......


Here are my questions:

(A)i have found some codes of making mock loation datas ,but these codes can not activate "onLocationChanged" function

However, i wonder if there is a way to send locating datas from PC to real device via USB port(i'm in USB debugging mode), just like sending locations from DDMS to emulator?

(B)i've got the information that, it is possible to send "geo fix" command to emulator as well as to a real device, by "telnet localhost ", but how to check out the port number occupied by my real device?

i know that 5554 port is used for a emulator,but what about the real device?

i've tried to command "netstat" in terminal, but it's a shame to say that i don't know which port is for my android phone......

(C)If my (A)(B) question is not practical,then what's "settings/applications/development/allow mock location" used for?

Please help me, and thank you for your answer!

0 投票
1 回答
367 浏览

javascript - 限制多图只显示某些状态?

我希望使用 Polymaps 仅显示某些状态。我以失业图为例:

http://polymaps.org/ex/unemployment.html

我意识到返回的图块来自 polymaps.appspot.com,并且我尝试创建一个回调函数:

但这里的问题是a)它不起作用(即使使用正确的CSS),如果它起作用了,它只会隐藏州的轮廓,而不是县覆盖。我仍然希望保持县覆盖所提供的详细程度,但不是针对所有州。

我该怎么做呢?

谢谢!

0 投票
3 回答
8120 浏览

android - 地理点与位置

这可能是一个菜鸟问题,但我不能 100% 确定。

如何使用地理点制作位置对象?我想用它来获取两点之间的距离。我已经找到了一个帖子,上面写着

然后我会使用 distanceTo() 来获得两点之间的距离。

我的问题 Providername 的用途是什么?...新位置(“这里是什么???”)那么我必须在之前定义一个提供者吗?我想在 for() 中使用此代码在更多 GeoPoints 之间进行计算。顺便说一句 - 我必须将 E6 值转换回正常值?

0 投票
1 回答
12234 浏览

google-maps - 如果您只有国家/地区名称,如何将谷歌地图围绕一个国家/地区居中

我有一个关于在各个国家远足的页面。我正在尝试为每个国家/地区制作一个这样的页面,但不确定如何自动将谷歌地图围绕一个国家/地区居中,并让它根据国家/地区的大小调整焦点。

这是我的问题页面:

http://www.comehike.com/outdoors/country.php?country_id=6&country_name=白俄罗斯

http://www.comehike.com/outdoors/country.php?country_id=1&country_name=United%20States

您看到居中和焦点大小是如何静态的吗?那是因为我目前使用此代码将地图居中:

但这只是因为我不确定如何按国家名称进行操作,并自动调整大小。如何通过将国家/地区名称传递给初始化函数来完成这一切?

谢谢!

0 投票
1 回答
1734 浏览

geolocation - 从用户输入解析城市代码

那里有很多地理编码服务(例如http://geo-autocomplete.googlecode.com/svn/trunk/demo/ui.demo.html),用户可以在其中编写位置(或其中的一部分)和它将被解析为真实的现有位置。

搜索结果还提供了很多信息(如国家 ISO 代码、坐标等),但似乎没有一个服务提供国家和城市代码。

我的意思是用于打电话给某些人的代码。例如,德国的国家代码为 49,杜塞尔多夫的城市代码为 211。

是否有任何服务,我可以从用户输入中获取此信息。或者有什么办法可以将两者结合起来。例如,我从谷歌地理编码服务获取城市名称,并在一些城市代码数据库中尝试。如果是的话,谁能给我提供链接。

0 投票
1 回答
1244 浏览

javascript - 如何使用 geoXML3 从外部 url 获取 KML?

是否有可能以某种方式从同一域的源中获取 KML。我的意思是要以某种方式避免“ Javascript 的同源政策”?(在我们的服务器上缓存不是这种情况,因为该应用程序旨在与外部资源一起使用)

下面的代码是我们想要完成的(它会在外部 kml 源的情况下给出错误)。

为什么要问是否有该政策?由于google.maps.KmlLayer做了这种工作。不知道如何或我错过了一些东西。真的需要geoxml3并了解幕后的内容!

0 投票
0 回答
3723 浏览

wordpress - Wordpress 地理位置搜索

好的,一直在寻找插件,但没有运气。所以我回到了堆栈-

如何在我的 wordpress 帖子中添加一个邮政编码字段,这将使我能够提供半径搜索以仅显示该半径内的帖子?我见过大量与地理相关的插件,但没有一个提供基于位置的搜索。

基本上我想在每个帖子中列出一个项目/商店,并能够在搜索结果中显示它们。

谢谢你的帮助。

0 投票
14 回答
236440 浏览

geolocation - 给定纬度/经度坐标,我们如何找出城市/国家?

例如,如果我们有这些坐标集

我们怎样才能找到城市/国家?