Software Archive
Read-only legacy content
17061 Discussions

how to add multiples marker to the google map widget of intel xdk

nicolas_r_
Beginner
712 Views

hi im new at intel XDK and i would like to use her widget of google maps and add some markers with icon and info windows i tried modifying the widget but i get confused by her code, and tutorial or  guide i will apriciate a lot 

0 Kudos
6 Replies
Chris_P_Intel
Employee
712 Views

Take a look at the services and maps tutorial. It might help. https://software.intel.com/en-us/videos/service-results-as-markers-on-a-google-map

Though, if you want to really work intensely with Google Maps, you'll have to dive into the Google Maps API and write your own JS code. The widget can get help set up a map and the basic JS for you, but for anything complicated it's BYO.

0 Kudos
nicolas_r_
Beginner
712 Views

I tried ussing Google Maps API with JS but i get stucked into a problem tath the maps shows full grey and i have to rotate the screen to fix tath but i don't know how to fick from the code 

0 Kudos
John_H_Intel2
Employee
712 Views

Not sure if this will work for you or not, but its a snippet of code I used a long time ago to fix the issue you are describing.

    function triggerMap()   // called on div load. dont need to call from another function
    {
        google.maps.event.trigger(_map, 'resize');
        _map.panTo(new google.maps.LatLng(40.328359,-76.785390));
   }

 

<div title="Location" id="ourLocation" class="panel" data-load="triggerMap" style="height:100%" scrolling="no">
        <div><header>stuff can go here </div>    
            <div id="map_canvas" style="min-height:100%;height:100%;"></div>
    </div>  

0 Kudos
nicolas_r_
Beginner
712 Views

so i have to add the function triiger on top of my js file? and the data load on the div where is the page of the map? im new on this sorry

 

 

0 Kudos
John_H_Intel2
Employee
712 Views

Correct, that should do it for you.

0 Kudos
nicolas_r_
Beginner
712 Views

can pls sendme a code of the map with her div like to edit and start from tath 

0 Kudos
Reply