Skip to content

Instantly share code, notes, and snippets.

@juanluisrp
Created December 27, 2012 02:06
Show Gist options
  • Save juanluisrp/4384845 to your computer and use it in GitHub Desktop.
Save juanluisrp/4384845 to your computer and use it in GitHub Desktop.
Properly setting of externalGraphic size in OpenLayers.
var myStyles = new OpenLayers.StyleMap(
new OpenLayers.Style(
{
externalGraphic: baseUrl +'/img/marker-blue.png',
fill: false,
stroke: false,
pointRadius: 0,
graphicWidth: 18 ,
graphicHeight: 30,
fillOpacity: 1,
graphicXOffset: -30/2,
graphicYOffset: -18/2
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment