Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Map should show Australia by default and not the whole world map

My data is just for the Australian post codes and I want the map to show only that. But not sure why it shows the entire world map.

onlyAustralia.PNG.png

1 Solution

Accepted Solutions
SergeyMak
Partner Ambassador
Partner Ambassador

I've found that in your data you have a record with WorkLong and WorkLat = 0 for postcode=2174

If I exclude it the map looks as you need.

Probably the problem is with this record. If you delete or correct it you will get your map

Regards,
Sergey

View solution in original post

25 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

it's difficult to solve if there are no sample.

But in longitude and latitude expression you should use variable like $(var_zoom), which defined as

var_zoom=   '=max(aggr(if(max( round(256*pow(2,(_zoom_level -1)))+( Longitude  *((256*pow(2,_zoom_level ))/360)) )-min( round(256*pow(2,(_zoom_level -1)))+( Longitude  *((256*pow(2,_zoom_level ))/360)) ) <map_size_x AND max((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((Latitude)*pi()/180)))/(1-(sin((Latitude)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))-min((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((Latitude)*pi()/180)))/(1-(sin((Latitude)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))<map_size_y,_zoom_level,1),_zoom_level))';

for example latitude expression:

((256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin((Latitude)*pi()/180)))/(1-(sin((Latitude)*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi()))))

Regards,
Sergey
Not applicable
Author

I have the var_zoom defined. I am attaching my qvw file. Please help.

Not applicable
Author

Hi Sergey, I have the var_zoom defined that away. I am attaching my qvw file anyway. If you can help that would be great.

Thanks,

Ram


rajat2392
Partner - Creator III
Partner - Creator III

You have to set the default zoom at the median of longitude and latitude.

Not applicable
Author

How?

rajat2392
Partner - Creator III
Partner - Creator III

How you have applied this map....

As the background or Google Map extension Object..??

Not applicable
Author

applied map already as the background. see the attachment.

rajat2392
Partner - Creator III
Partner - Creator III

I have not downloaded your app.

Try this

='http://maps.google.com/staticmap?center='

&

num(Min(Latitude)+((Max(Latitude)-Min(Latitude))/2), '##############', '.', ',' )

&

','

&

num(Min(Longitude)+((Max(Longitude)-Min(Longitude))/2), '##############', '.', ',' )

&

'&zoom=$(var_zoom)'

&

'&maptype='&var_maptype

&

'&size='&map_size_x&'x'&map_size_y

&

'&key='&gmap_key & '&.jpg'

check the bold lines in your background, set it as this. Change Latitude and Longitude with the name of the field in your context.

rajat2392
Partner - Creator III
Partner - Creator III

I have not downloaded your app.

Try this

='http://maps.google.com/staticmap?center='

&

num(Min(Latitude)+((Max(Latitude)-Min(Latitude))/2), '##############', '.', ',' )

&

','

&

num(Min(Longitude)+((Max(Longitude)-Min(Longitude))/2), '##############', '.', ',' )

&

'&zoom=$(var_zoom)'

&

'&maptype='&var_maptype

&

'&size='&map_size_x&'x'&map_size_y

&

'&key='&gmap_key & '&.jpg'

check the bold lines in your background, set it as this. Change Latitude and Longitude with the name of the field in your context.