Page 3 of 3

How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Tue Mar 12, 2013 4:49 pm
by Kateryna Grynko

Don, we are working on it...


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Tue Mar 12, 2013 7:59 pm
by Kateryna Grynko

There were some problems, we've fixed. Please try to open app again.


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Tue Mar 12, 2013 8:38 pm
by Don

Hi Katya,

The app is no longer freezing and displaying the white page...
but there is also still no mapping working.

Looking at the JS, it is all messed up now:

precode
googleMapDiv = Tiggzi("googlemap1_2")&#46;get(0);&#xd;$googleMapDiv = $(googleMapDiv);&#xd;mapWidth = $googleMapDiv&#46;width();&#xd;mapHeight = $googleMapDiv&#46;height();&#xd;&#xd;&#47;Adjust zoom to cover all marks&#47;&#xd;function log2(m) {&#xd;return ((Math&#46;log(m)) &#47; (Math&#46;log(2)));&#xd;};&#xd;var maxLatitude = -90,&#xd;minLatitude = 90,&#xd;maxLongitude = -180,&#xd;minLongitude = 180,&#xd;location, widthForZoom0 = 256,&#xd;&#47;map width&#47;height = 256px for zoom = 0&#47;&#xd;mapWidth, mapHeight, mapDivZoom, mapZoom, resultZoom, googleMapDiv, $googleMapDiv, mapOptions, map, i, sfLatlng, marker;&#xd;for (i = 0; i < value&#46;length; i++) {&#xd;location = value['location'];&#xd;maxLatitude = location['latitude'] > maxLatitude ? location['latitude'] : maxLatitude;&#xd;minLatitude = location['latitude'] < minLatitude ? location['latitude'] : minLatitude;&#xd;maxLongitude = location['longitude'] > maxLongitude ? location['longitude'] : maxLongitude;&#xd;minLongitude = location['longitude'] < minLongitude ? location['longitude'] : minLongitude;&#xd;};&#xd;mapZoom = log2(1 &#47; Math&#46;max(Math&#46;abs((maxLatitude - minLatitude) &#47; 180), Math&#46;abs((maxLongitude - minLongitude) &#47; 360))); &#47;zoom for current map piece&#47;&#xd;mapDivZoom = log2(Math&#46;min(mapWidth, mapHeight) &#47; widthForZoom0); &#47;zoom for current size of map div&#47;&#xd;resultZoom = Math&#46;floor(mapDivZoom + mapZoom); &#47;result map zoom&#47;&#xd;if (resultZoom > 15) {&#xd;resultZoom = 15;&#xd;}&#xd;if (resultZoom < 0) {&#xd;resultZoom = 0;&#xd;}&#xd;mapOptions = {&#xd;zoom: resultZoom,&#xd;center: new google&#46;maps&#46;LatLng((maxLatitude + minLatitude) &#47; 2, (maxLongitude + minLongitude) &#47; 2),&#xd;mapTypeId: google&#46;maps&#46;MapTypeId&#46;ROADMAP&#xd;};&#xd;&#xd;&#47;Add marks to screen&#47;&#xd;map = new google&#46;maps&#46;Map(googleMapDiv, mapOptions);&#xd;for (i = 0; i < value&#46;length; i++) {&#xd;sfLatlng = new google&#46;maps&#46;LatLng(value['location']['latitude'], value['location']['longitude']);&#xd;marker = new google&#46;maps&#46;Marker({&#xd;position: sfLatlng,&#xd;map: map&#xd;});&#xd;};&#xd;
/code/pre


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Tue Mar 12, 2013 9:32 pm
by Kateryna Grynko

Hi Don,
Yes, this is a known editor problem. There should be new lines instead of code"&#xd;"/code
Replace them manually and mapping should work.


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Tue Mar 12, 2013 9:47 pm
by Don

Replaced &#xd; with returns and now the app returns the white page again and hangs.


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Wed Mar 13, 2013 1:02 pm
by Maryna Brodina

Hello!

You should change mapping on LocationMap page ( REST_4locations Response) - map LOCATION to JavaScript mapJS, not LOCATIONS

Here is the JS code:

code googleMapDiv = Tiggzi("googlemap1_2")&#46;get(0);
$googleMapDiv = $(googleMapDiv);
mapWidth = $googleMapDiv&#46;width();
mapHeight = $googleMapDiv&#46;height(); &#47;Adjust zoom to cover all marks&#47;

Code: Select all

             function log2(m) { 
                 return ((Math&#46;log(m)) &#47; (Math&#46;log(2))); 
             }; 
             var maxLatitude = -90, 
                 minLatitude = 90, 
                 maxLongitude = -180, 
                 minLongitude = 180, 
                 location, widthForZoom0 = 256, 
                 &#47;*map width&#47;height = 256px for zoom = 0*&#47; 
                 mapWidth, mapHeight, mapDivZoom, mapZoom, resultZoom, googleMapDiv, $googleMapDiv, mapOptions, map, i, sfLatlng, marker; 
             for (i = 0; i < value&#46;length; i++) { 
                 location = value[i]; 
                 maxLatitude = +location['LATITUDE'] > maxLatitude ? +location['LATITUDE'] : maxLatitude; 
                 minLatitude = +location['LATITUDE'] < minLatitude ? +location['LATITUDE'] : minLatitude; 
                 maxLongitude = +location['LONGITUDE'] > maxLongitude ? +location['LONGITUDE'] : maxLongitude; 
                 minLongitude = +location['LONGITUDE'] < minLongitude ? +location['LONGITUDE'] : minLongitude; 
             }; 
             mapZoom = log2(1 &#47; Math&#46;max(Math&#46;abs((maxLatitude - minLatitude) &#47; 180), Math&#46;abs((maxLongitude - minLongitude) &#47; 360))); &#47;*zoom for current map piece*&#47; 
             mapDivZoom = log2(Math&#46;min(mapWidth, mapHeight) &#47; widthForZoom0); &#47;*zoom for current size of map div*&#47; 
             resultZoom = Math&#46;floor(mapDivZoom + mapZoom); &#47;*result map zoom*&#47; 
             if (resultZoom > 15) { 
                 resultZoom = 15; 
             } 
             if (resultZoom < 0) { 
                 resultZoom = 0; 
             } 
             mapOptions = { 
                 zoom: resultZoom, 
                 center: new google&#46;maps&#46;LatLng((maxLatitude + minLatitude) &#47; 2, (maxLongitude + minLongitude) &#47; 2), 
                 mapTypeId: google&#46;maps&#46;MapTypeId&#46;ROADMAP 
             }; &#47;*Add marks to screen*&#47; 
             map = new google&#46;maps&#46;Map(googleMapDiv, mapOptions); 
             for (i = 0; i < value&#46;length; i++) { 
                 sfLatlng = new google&#46;maps&#46;LatLng(value[i]['LATITUDE'], value[i]['LONGITUDE']); 
                 marker = new google&#46;maps&#46;Marker({ 
                     position: sfLatlng, 
                     map: map 
                 }); 
             }; 

/code


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Thu Mar 14, 2013 1:55 am
by Don

Sorry, as soon as the XML is returned, I still get a blank white page and endless wait circle.

If I remove the JS, the page returns correctly, including the webservice response/locations being populated.


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Thu Mar 14, 2013 8:20 am
by Maryna Brodina

Hello! Did you follow instructions I've suggested above?


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Thu Mar 14, 2013 1:46 pm
by Don

Yes.
I have shared the app with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a


How to add custom icons for Geolocation Marker & Multiple Location Points? I will pay for a good answer.

Posted: Thu Mar 14, 2013 2:03 pm
by Maryna Brodina

You should delete mapping from LOCATIONS and replace code with the code I've suggested above https://getsatisfaction.com/tiggzi/to...

You have incorrect JS