Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

url hash support #392

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

url hash support #392

wants to merge 1 commit into from

Conversation

arivasvera
Copy link

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();

@hpneo
Copy link
Owner

hpneo commented May 1, 2015

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

@arivasvera
Copy link
Author

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)

@hpneo
Copy link
Owner

hpneo commented May 1, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants