Loading...
 
Skip to main content

Features / Usability


Zoom Level of a Map

Dear folks, I am trying to control the zoom level of a map with this:

Copy to clipboard
{MAP()} {searchlayer tracker_field_fieldname="HandtoolIntroductionMapIt" refresh="3600" maxRecords="1" fields="tracker_field_fieldname28" center="9"} {MAP}


I am displaying the geographical location of a tracker item, the coordinates are predefined in the tracker, I only want the map displayed at a certain world zoom level on a wiki page. And the map marker shows appropriately, but I want to zoom the map to a certain level.

Am I using the zoom parameter correctly with center="9"

THanks folks


Thanks Bernard, I have read through the documentation, what I am trying to accomplish as the map zoom level to country level in this example:
https://thepatriotwoodwiki.org/AxeQuestion

You'll see the infobox with a micro region map below it, since the location is set at tracker creation, I am trying to get the map to display zoomed away a bit more for viewer context.
I am no sure where I should handle that for the x and y in addition to the zoom, since the tracker already took care of the x and y.. Hmmm
Thanks for your help Bernard, and Merry Christmas!


In your tracker field location you have the same 3 variables to set the long, lat and zoom.


HereQuestion you can see using a tracker field with zoom = 15.

Choosing the zoom level that fit what you want to display should work.

Oh crud! I see it now! Duh!!!!!! Right in the tracker field as you stated, gives the option to use zoom, thanks Bernard!

Bernard, am I displaying my map tracker field correctly with:

Copy to clipboard
{MAP()} {searchlayer tracker_field_fieldname="HandtoolIntroductionMapIt" refresh="3600" maxRecords="1" fields="tracker_field_fieldname28"} {MAP}


If that is not correct format could you share your format here with me?


It depends on your use case but it look to me ok (I guess MAP plugin will use default setting).

Here a pasted sample I have for one of mine: with 3 layers over a map.

Copy to clipboard
{MAP(scope="Center" controls="controls, layers, levels, navigation" center="0,0,12" tooltips="y")} {searchlayer tracker_field_backgroundMap ="y"} {searchlayer tracker_field_menLocationPublished ="y" maxRecords="200" tracker_status ="o" load_delay ="2"} {searchlayer tracker_field_womenLocationPublished ="y" maxRecords="200" load_delay ="3"}{MAP}


Hope this helps.

Bernard

Thanks Bernard! But the code is not showing.
By the way, what an interesting tiki you have! I used Google translate to read some of it, and I enjoyed it.



Now the code is showing, thanks.


one more question Bernard, any direction on defaulting maps to Open Layers instead of google maps would be greatly appreciated.

Hi John,
on tiki-admin.php?page=maps try to set only "openstreetmap" in the Available tile layers on maps field or sort them differently there.

HTH,
luci