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

rdeboer’s picture

Assigned: Unassigned » rdeboer

Thanks for the pointer, nod_! Will check it out.
Rik

rdeboer’s picture

Category: support » feature

Ok, 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

nod_’s picture

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.

rdeboer’s picture

Happy to work together on OpenLayer integration, nod_ !

nod_’s picture

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 :)

rdeboer’s picture

That would be great!

rdeboer’s picture

Views/Map support for Geofield 1.1 is now available in IP Geolocation 7.x-1.9
See project page for instuctions.

Sinan Erdem’s picture

Can 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.

rdeboer’s picture

I'm doing some initial research on this. Stay tuned.

rdeboer’s picture

@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...

rdeboer’s picture

Title: Integration with other geo modules » Integration with other geo modules and OpenLayers
Sinan Erdem’s picture

I 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?

rdeboer’s picture

@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 like drupal_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

rdeboer’s picture

Status: Active » Fixed

The 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

typo