Any idea how to init the location (so the pin is dropped) with GeoComplete?
$("#geocomplete").geocomplete({
map: ".map_canvas",
location: [52.4078567, 16.92718339999999], // is it centring the map, no pin thought
markerOptions: {
draggable: true
},
details: "form",
types: ["geocode", "establishment"]
});
The example above does center the map, but is it not dropping a pin. Why?
Online demo here.
The pin does not appear to be placed when you specify a longitude and latitude on initialization.
The alternative is to remove the location option from the initialization, and do a once-off search of your default location just after you have created the geocomplete instance:
Followed by a find by address:
Or by longitude and latitude: