Closed (fixed)
Project:
IP Geolocation Views & Maps
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
17 Jan 2012 at 10:41 UTC
Updated:
27 Jul 2012 at 06:21 UTC
I'm wondering if you had a look at geofield/geocoder/openlayers and if/how we can integrate this awesome functionality with them.
I'm not exactly sure what/how/why since I heard about this module today but it'd be great to hear your opinion. Plans are being made for geofield 2.x, this will interest them :)
Comments
Comment #1
rdeboerThanks for the pointer, nod_! Will check it out.
Rik
Comment #2
rdeboerOk, had a closer look. Geocoder and GeoField appear to operate in a different space. They are geocoding modules (address -> lat/long -> map), whereas IP Geolocation is a reverse-geocoding module (WiFi/GPS/IP -> lat/long -> map + address).
However, I can a see IP Geolocation offering OpenLayers as an alternative to Google Maps as the fixed mapping tool. This would give users access to not just Google Maps but a whole range of mapping alternatives, as explained on the OpenLayers project page
Comment #3
nod_Looks like you could integrate with geocoder, it's job is converting whatever to lat/lon, it can do adresses could be interesting to add ip/wifi to it :) I'm not very familliar with how to do it but I can get people who know around here.
For openlayers that'd be really nice actually. If you're interested I can help you make the behavior to provide integration to the OL module.
Comment #4
rdeboerHappy to work together on OpenLayer integration, nod_ !
Comment #5
nod_I'm still very much interested to get that going with openlayers :) I'll take some time this week to work on OL and take care of this at the same time :)
Comment #6
rdeboerThat would be great!
Comment #7
rdeboerViews/Map support for Geofield 1.1 is now available in IP Geolocation 7.x-1.9
See project page for instuctions.
Comment #8
Sinan Erdem commentedCan we expect an integration with openlayers anytime soon?
My usecase is, I have a map created with openlayers. I dont need to filter out the results, but just zoom the map to users currenct location. Then, he can pan and see the other results.
Comment #9
rdeboerI'm doing some initial research on this. Stay tuned.
Comment #10
rdeboer@etcetera9, #8
A first cut of the feature you've requested is now available in the dev version of IP Geolocation (dated 3 July 2012 or later).
It works on any OpenLayers map you may already have created using other modules and then if IP Geolocation is enabled, it will auto-center any OpenLayers map to the visitor's current location, as retrieved by HTML5, with a static IP lookup via either Smart IP or GeoIP as a fallback.
If anyone reading this needs full instructions on how to create an OpenLayer map based on a View of Geofield node fields, see these great instructions: http://drupal.org/node/1481374.
Enjoy!
Note: you may have to press the "Clear all caches" button once, on page .../admin/config/development/performance to let IP Geolocation do its thing...
Comment #11
rdeboerComment #12
Sinan Erdem commentedI tried my map. Although it asks my location (HTML5 info popup) and I allow it. And even if I refresh the page, it doesn't zoom in to my current location. Do I have to do anything else on openlayers maps settings or on views?
Comment #13
rdeboer@etcetera9, #12
I'm very much surprised it doesn't work. Here are a few tips:
1) The new version (3 July) was not generated as a tarball yet, when you tried it (it is now). So unless you checked it out from Git, you may still have been working with the old version
2) To see what position IP Geolocation retrieves as your location tick the box Detail execution progress with status messages in the Advanced options section of the the page .../admin/config/system/ip_geoloc.
3) If you forgot to clear the cache at .../admin/config/development/performance then the relevant hook may not have been called. To verify that the hook is called, edit file ip_geoloc/ip_geoloc.module. Insert at line 38, just below
function ip_geoloc_openlayers_map_alter(&$map)something likedrupal_set_message('Hello');.If you don't see that message popup when you refresh the map, then there's something really strange happening. If it does pop up, then all should be fine....
Rik
Comment #14
rdeboerThe OpenLayers interface is now complete, including centering and marker balloons on hover or click, as configured on the OpenLayers Map Behaviors page).
You need to enable the relevant "Vistor marker" layer on the Openlayers Map "Layers & Styles" page.
Comment #15.0
(not verified) commentedtypo