- Posts: 9
- Thank you received: 0
Auto center and auto zoom on markers
- clever
- Topic Author
- Offline
- New Member
Less
More
6 years 8 months ago #11515
by clever
Auto center and auto zoom on markers was created by clever
Hi,
really like your component and it has so much amazing features. I was looking into a way to display a overview map for locations, but also make it work responsively. If found out, this might be possible:
coderwall.com/p/hojgtq/auto-center-and-auto-zoom-a-google-map
Question is: is there a way to use that in your component?
Thanks.
really like your component and it has so much amazing features. I was looking into a way to display a overview map for locations, but also make it work responsively. If found out, this might be possible:
coderwall.com/p/hojgtq/auto-center-and-auto-zoom-a-google-map
Question is: is there a way to use that in your component?
Thanks.
Please Log in or Create an account to join the conversation.
- Dima
- Offline
- Platinum Member
6 years 8 months ago #11519
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Auto center and auto zoom on markers
Hi.
I can add like this code to my extension, because I have all markers coordinates.
But I don't think it's good idea.
1 - you can easy set map center and zoom to show all markers (without this code). I agree with you - you need in this case a little bit more tries. But in any case you can set it easy.
2 - you can also center map by definite marker (by setting its ID in menu property or by plugin parameter)
And the big Cons. If you set dynamic loading placemarks (if you have lots of it on map, use AJAX loading), markers will get partly by data blocks (you set amount of it in map settings), and bounds will change by every data block. In this case your map can change zoom or center with every loading data block. And you can see "shaking" map.
I can add like this code to my extension, because I have all markers coordinates.
But I don't think it's good idea.
1 - you can easy set map center and zoom to show all markers (without this code). I agree with you - you need in this case a little bit more tries. But in any case you can set it easy.
2 - you can also center map by definite marker (by setting its ID in menu property or by plugin parameter)
And the big Cons. If you set dynamic loading placemarks (if you have lots of it on map, use AJAX loading), markers will get partly by data blocks (you set amount of it in map settings), and bounds will change by every data block. In this case your map can change zoom or center with every loading data block. And you can see "shaking" map.
Don't forget support my developments: post review in JED , donate , help with translation
The following user(s) said Thank You: clever
Please Log in or Create an account to join the conversation.
- clever
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
6 years 8 months ago #11520
by clever
Replied by clever on topic Auto center and auto zoom on markers
Thanks for your reply.
I understand your concerns and I have successfully centered and zoomed my map accordingly.
They main goal would have been to have a dynamically resizing / rezooming map for all devices and resolutions.
I understand your concerns and I have successfully centered and zoomed my map accordingly.
They main goal would have been to have a dynamically resizing / rezooming map for all devices and resolutions.
Please Log in or Create an account to join the conversation.
- Dima
- Offline
- Platinum Member
6 years 8 months ago #11522
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Auto center and auto zoom on markers
You can manage map size
set
width=0 it means width=100%
height=0 it means height=100%
Set CSS class name in map details - you'll get your CSS name for main map div
And use CSS styles and apply any styles.
As for height=100% - read some posts in my forum - for complicated templates you can get empty map div due to collapse divs, but if your template can correct store div size, you can also call plugin in this div.
As for zoom for different resolutions - I can't control.
set
width=0 it means width=100%
height=0 it means height=100%
Set CSS class name in map details - you'll get your CSS name for main map div
And use CSS styles and apply any styles.
As for height=100% - read some posts in my forum - for complicated templates you can get empty map div due to collapse divs, but if your template can correct store div size, you can also call plugin in this div.
As for zoom for different resolutions - I can't control.
Don't forget support my developments: post review in JED , donate , help with translation
The following user(s) said Thank You: clever
Please Log in or Create an account to join the conversation.
- Dima
- Offline
- Platinum Member
6 years 8 months ago #11523
by Dima
Don't forget support my developments: post review in JED , donate , help with translation
Replied by Dima on topic Auto center and auto zoom on markers
For example, check my demo - full screen map.
It is my simple template with 100% of height and width
joomla.zhuk.cc/index.php/zhgooglemap-mai...-feature-full-screen
It is my simple template with 100% of height and width
joomla.zhuk.cc/index.php/zhgooglemap-mai...-feature-full-screen
Don't forget support my developments: post review in JED , donate , help with translation
The following user(s) said Thank You: clever
Please Log in or Create an account to join the conversation.
- clever
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
6 years 8 months ago #11525
by clever
Replied by clever on topic Auto center and auto zoom on markers
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds