gmaps icon indicating copy to clipboard operation
gmaps copied to clipboard

url hash support

Open arivasvera opened this issue 11 years ago • 3 comments

zoom, lat and lng from url: http://localhost/gmaps/#18/10.444112174678937/-64.17193496227266

bounds_changed event used for change hash url usage:

var map = new GMaps({
  div: '#map',
  lat: -12.043333,
  lng: -77.028333
});
map.getURLHash();

arivasvera avatar Mar 16 '15 17:03 arivasvera

What if I have more than one map in one page?

hpneo avatar May 01 '15 03:05 hpneo

I think you could choose to activate one of the maps,

var mapA = new GMaps({
  div: '#mapA',
  lat: -12.043333,
  lng: -77.028333
});
mapA.getURLHash();

var mapB = new GMaps({
  div: '#mapB',
  lat: -12.043333,
  lng: -77.028333
});
//mapB.getURLHash();

or simply use it in cases of having just one. As is the case with maps.google.com It really was intended for a map on a page

(Sorry my bad english)

arivasvera avatar May 01 '15 04:05 arivasvera

Uhm, ok. But, please, put your method in gmaps.core.js. gmaps.js is just a bundle.

hpneo avatar May 01 '15 04:05 hpneo