Local file won't work.
Local file won't work.
I see. Okay, can you please tell me where you are inserting your code then? I recall you said in an earlier post you dont need a geolocation component but to just use the map.....How? I dont see a way to insert code anywhere in a map component......Can you please clarify?
Geolocation component determines your current location. If you have some location already determined (latitude/longitude), then you can use that.
Thanks for the response, but I already knew that. What I am asking is - If I have a location already determined and I use it in this code -
var location = new google.maps.LatLng(-25.363882,131.044922);
var myOptions = {
zoom: 4,
center: location,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map($('div[dsid="mapa"]').get(0), myOptions);
var marker = new google.maps.Marker({
position: location,
map: map,
title:"Hello World!"
});
Do I use a component to put that code in? If not where do I put it, in order to see it in action?????
You would put this code in Run Custom JavaScript action or in JavaScript file (asset) as function as then invoke it.
Ok, great! Thanks!
How do you set the icon for the marker? I want to have different Google Map marker icons for different spots (depending on POI category - example, restaurants, hotels, etc).
Hello! You should be able to do it with Google Maps API. This should help https://developers.google.com/maps/do... (Customizing the Marker Image), http://stackoverflow.com/questions/48...
I am getting some product store locations using an api and displaying in screen 1 and i want the locations to be displayed in a map with markers in screen2 and i am saving their lat long in click action but how to display the map with markers of all the query results.
You do it with Google Map API. You would need to create a marker for each lat/long in your array, and then add it to the map.