Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specifying a custom center via map_config #11

Open
funtoosh opened this issue Mar 15, 2011 · 9 comments
Open

specifying a custom center via map_config #11

funtoosh opened this issue Mar 15, 2011 · 9 comments

Comments

@funtoosh
Copy link

hi there,
i was trying to give a map with loads of markers a custom center point, "default_point" would not work, as there are location elements in location_selector, so i tried to add a center via map_config: {center: LatLng(lat: 52.539366, lng: 13.387549)} but to no avail ... are there any other ways to achieve that? am i missing sth.?
cheers from germany, and thx for the plugin, great job! -f

@funtoosh
Copy link
Author

PS you can see my attempt over here: http://cyclingtheworld.de/#route

@funtoosh
Copy link
Author

mhm, any ideas? anyone?

@brd1984
Copy link

brd1984 commented May 13, 2011

@funtoosh

Have you had any luck with this? I am too trying to work out how to have a custom center for the map.

See mine: http://www.deeside.ac.uk/community/. Need the map icons centering

Thanks

@metalguru
Copy link

Any chance you two have had luck with this? I'm attempting to center a map at a specific point rather than automatically centering based on pin dispersal... using center: google.maps.LatLng([point], [point]) isn't working for me. The map continues to center based on the pins.

Thanks!!

@brd1984
Copy link

brd1984 commented Jun 21, 2011

No luck at all, let me know if you find one!

Cheers

Sent from iPhone

On 21 Jun 2011, at 18:00, [email protected] wrote:

Any chance you two have had luck with this? I'm attempting to center a map at a specific point rather than automatically centering based on pin dispersal... using center: google.maps.LatLng([point], [point]) isn't working for me. The map continues to center based on the pins.

Thanks!!

Reply to this email directly or view it on GitHub:
#11 (comment)

@metalguru
Copy link

Hey brd184,

I was able to accomplish centering the map on the marker areas I want by using the bounded:false mod here:
tra@5f7414b

If you specify bounded:false in your data-jmapping attribute the marker will not be included in that centering/boundary calculation. So, while it's not specifying a "center point" per se, I'm achieving a center point by excluding markers.

Not sure if I'm explaining it well! ...hope it makes sense. The site I'm working with isn't public yet, otherwise I'd give you a link to my example. It will be live soon though and I'll post a link.

@brd1984
Copy link

brd1984 commented Jun 27, 2011

Hey - works like a treat!! Thanks so much for the answer!

Cheers
Ben

On Wed, Jun 22, 2011 at 9:34 PM, metalguru <
[email protected]>wrote:

Hey brd184,

I was able to accomplish centering the map on the marker areas I want by
using the bounded:false mod here:

tra@5f7414b

If you specify bounded:false in your data-jmapping attribute the marker
will not be included in that centering/boundary calculation. So, while it's
not specifying a "center point" per se, I'm achieving a center point by
excluding markers.

Not sure if I'm explaining it well! ...hope it makes sense. The site I'm
working with isn't public yet, otherwise I'd give you a link to my example.
It will be live soon though and I'll post a link.

Reply to this email directly or view it on GitHub:
#11 (comment)

@filemeaway
Copy link

@metalguru

I know this is a few months old, but how do you actually set the center Lat/Lng?

@ghost
Copy link

ghost commented Jul 29, 2013

Hello, I was also able to accomplish centering the map with @metalguru's method.

I actually had the HTML5 metadata_options: {type: 'html5'}, enabled, so I simply chose my point with data-bounded="true"> to center the map to that metadata.

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

No branches or pull requests

4 participants