I just checkout the latest codes from git and find that the plugin for openlayers get this problem.
The position is set correctly, but the mark is not displayed.
Is it because "Use configurable /markers directory"?

Comments

rdeboer’s picture

Hi shenzhuxi,

Do you mean the location markers in general or the visitor marker or both?

The configurable /markers directory is NOT used for the OpenLayers interface. With Map (OpenLayers, via IP Geolocation) selected as the Views style/format you can NOT select the markers that come with the "IP Geolocation Views and Maps" module, which live in ip_geoloc/markers/*.png

However you can have different marker colours by creating different layers.

OpenLayers is a bit different from Google or Leaflet. You need to create and select a marker layers as outlined in the README of the "IP Geolocation Views and Maps module", which I've copied below:

A FEW OPENLAYERS TIPS
=====================
Of the modules in the OpenLayers package you only need to enable OpenLayers and
OpenLayers UI. In fact, you could even disable OpenLayers UI when you're done
configuring your maps.
Initially the location markers are likely to show up as black circles. To
change the marker shapes and colours you need to first associate the "Location
markers" layer with your map at Structure >> OpenLayers >> Maps >> List. If
there is no custom map on this page yet, you have to first clone and save under
a different name one of the existing maps. Once you've done that, you'll find
that on Structure >> OpenLayers >> Maps >> List the map appears with an Edit
link. Click that, followed by the "Layers & Styles" vertical tab. In the bottom
section of the page you'll find the "Current visitor marker" layer and a number
of "Location markers" layers. You'll only need to activate Location markers #1,
unless you have defined a "differentiator" (e.g. taxonomy term) on your view.
Pick marker styles from the drop-downs as you please and press Save. Note that
the location markers won't show up in the map preview, but the visitor marker
should. This is because the map doesn't know which view it will be paired with.
In fact there may be several views using the same map. Return to edit your view.
Under Format, Settings select the map you've just created and edited. Save the
format and the view. Visit the page containing your view and all markers should
appear in the colours you chose.
In order to make the text balloons pop up at a marker when hovered or clicked,
visit Structure >> OpenLayers >> Maps >> Edit and click the "Behaviors"
vertical tab. Scroll down the page until you reach the "Pop Up for Features"
check box. Tick it and select the layers you're interested with, e.g.
ip_geoloc_visitor_marker_layer1 and/or ip_geoloc_marker_layer. Same for
"Tooltip for Features". Other nice behaviors that you may wish to flick on on
the same page are "Full Screen", "Layer Switcher", "Pan and Zoom Bar Controls"
and "Scale Line".

Rik

shenzhuxi’s picture

Here is the route for my problem

visit Structure >> OpenLayers >> Maps >> Edit and click the "Behaviors" vertical tab.

enable "Geolocate Client"
Provides the geolcoation control that simply zooms to users location on map load. Based on HTML5 geolocation, so this will not be supported in all browsers.

Edit and click the "Layers & Styles" vertical tab.

enable "Current visitor marker: Layer to mark visitor's current position'.
set "Marker Black Small" for both "STYLE" and "SELECT STYLE"

I checkout today's latest 7.x-1.x dev and 7.x-1.16, and still have the same problem

shenzhuxi’s picture

I just fixed this issue by reinstall openlayers.

rdeboer’s picture

Which of the maps available in OpenLayers did you decide to clone, rename, and edit? Was it the "Default Map"?

In "Layers & Styles" You must also have at least one "Base layer" selected as the default, e.g "OSM Mapnik: The main OpenStreetMap map".

And one "Overlay layer" for the location markers: e.g. "Location markers #1: Layer to map a view's locations."

I tried all of the above again on my system and it works fine....

rdeboer’s picture

Status: Active » Closed (fixed)

#3 and #4 written at same time and "crossed in the mail"

Closing issue based on comment in #3...

knalstaaf’s picture

Status: Closed (fixed) » Active

(I'm having the same problem with another module: OpenLayers Locator. Replied beneath this topic by mistake)

Moved my issue to #1763306: Markers are not showing on multiligual sites that use language prefix.

rdeboer’s picture

Thanks, closing.

rdeboer’s picture

Status: Active » Closed (works as designed)