Loading...
 
Features / Usability

Features / Usability


Zoom Level of a Map

posts: 731 United States

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

{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


posts: 731 United States

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/Axe

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!


posts: 8391 Israel

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


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

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

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

posts: 731 United States

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

{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?


posts: 8391 Israel

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.

{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

posts: 731 United States

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.



posts: 731 United States
Now the code is showing, thanks.


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

posts: 2422 Czech Republic

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