Drupal gmap:按城市设置标记而不是单击地图
我启用了位置和地图,以便用户可以按城市和国家添加当前位置。为了让用户出现在地图上,他们必须在地图上的位置上放置一个标记。
当用户设置城市时,是否可以在城市级别自动设置标记?
要求用户输入他们的位置,然后将其实际放置在地图上似乎很奇怪。
问候,
比利
I have location and maps enabled so that the user can add their current location by City and Country. To have the users appear on the map they have to place a marker on their location in the map.
Is it possible to have the markers set automatically at city level when the user sets the city?
Seems odd to ask the user to enter their location, then actually place it on the map..
Regards,
Billy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想要的设置位于 admin/settings/location/geocoding 中。由于位置提供商不喜欢持续的、大量的地理编码请求(这会占用一些 CPU),location.module 使您能够专门为每个国家/地区设置地理编码选项。添加您需要的国家/地区和您喜欢的提供商,然后保存设置。
您需要位置、位置搜索和位置信息。用户位置子模块已激活。
鉴于管理/用户/设置中的正确设置(全部向下滚动,到可折叠的“用户位置”),用户位置的地理编码现在应该可以工作。
@Jozzeh 的链接很好读,它解释了一些注意事项。
The setting you want is in admin/settings/location/geocoding . As Location providers frown on constant, high-volume geocoding requests (it takes some CPU on their part), location.module enables you to set the geocoding options for every country specifically. Add the countries you need, and the providers you prefer, and save the setting.
You need the location, location search & user locations submodules activated.
Given the correct setup in admin/user/settings (scroll all down, to the collapsible "user locations"), Geocoding of user locations should now work.
@Jozzeh's link is a good read, it explains some of the caveats.
我已经评论过,但我发现一个网页更详细地解释了如何设置 gmap 模块,因此用户只需输入数据,而不必单击地图。 点击此处。
根据用户输入的内容,保存节点(或用户)时,您可以使用视图样式来显示地图和(自定义)标记。
关于gmap的大部分设置可以在admin/settings/gmap中设置(这主要是为了改变zoomlevel的默认设置)
I've already commented but I've found a webpage explaining more in detail how to setup the gmap module, so users only have to enter their data instead of clicking the map as well. Click here .
Based on whatever the user has entered, when the node (or user) is saved you can work with the views-style to show the map and a (custom) marker.
Most settings about the gmap can be set at admin/settings/gmap (this is mainly to change default settings of zoomlevel)