Zoom to polygon onclick or with buttons

  • d0ugal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 6 months ago #5037 by d0ugal
Hi :) awesome component. I'm on wampserver with J!3.3 and ZHGM installed (so can't provide an URL, sorry). I've broken up a country into regions with Paths (polygons), and in addition to the info window onclick, I'd also like the map to zoom to the region (polygon).

Currently I can't see where to do this, so would it be possible to request in future versions of ZHGM an 'additional script' field to the paths creation/admin area so one can put in extra API calls?

If there's any way this can be done presently (not scared of JS or php) I'm happy to get myself into trouble on localhost if someone can give me a pointer :) Alternatively, is it possible for an admin to add buttons to the 'Addition HTML text' that could zoom the map in the same way the placemark list does?

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #5050 by Dima
Replied by Dima on topic Zoom to polygon onclick or with buttons
Hi.

Sorry for delay.
If you mean you want to change zoom when click on "path object" (ie on polygon, polyline or circle) - I can do it, but how about map center in this case.
For example, you can see 4 regions, you click on second, then map zoom changed, but you unexpected see the third region, because the map center was there.
Or the other example, as you can check - you can create one path (circle type), and can get, for example 10 circles. And click on it should zoom to ...??? (one path, many map objects :))

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

  • d0ugal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 6 months ago #5053 by d0ugal
Replied by d0ugal on topic Zoom to polygon onclick or with buttons
Centering would be great, center and zoom would be even better :) (even if centered, in my case i will still see all the regions defined by polygonal paths due to the initial zoom level on the map).

At the moment my workaround is to have placemarks at the center of each region, but those placemarks have fully transparent PNG icons (they are invisible)... clicking on an external placemark list gives me the effect i want (zoom and center), but this isn't ideal as:

1/people will still click on the map if they want to, and see the info window defined by a regional polygon - no zoom, no center.

2/ Only if they are lucky will they click the invisible placemark and it will zoom, center and pop up the placemark info window (which is just a copy of the content in the polygon info window).

3/ Ideally a regional polygon could behave as if it was a placemark onclick (eventually each region will house many placemarks, and this is how I intend to break up the 800 or so placemarks I need to make for this project... that is, by region).

Thanks for replying :)

Please Log in or Create an account to join the conversation.

  • d0ugal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 5 months ago #5088 by d0ugal
Replied by d0ugal on topic Zoom to polygon onclick or with buttons
Hi again :) Any update on the 'zoom and center polygon onclick' question? I had one idea:

- right now the only option for a path(polygon) onclick is to open it's info window - would it be hard to have an option where the path(polygon) obeys the onclick properties of a chosen placemark by it's ID? sounds awesome, but I have no idea how to do it :)

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #5093 by Dima
Replied by Dima on topic Zoom to polygon onclick or with buttons
Sorry, I very busy at work, and have no time to do developments. I think on next week I'll come back to developments

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.244 seconds
Powered by Kunena Forum