Jump to content

route_map


flyalaska

Recommended Posts

try flown_routes_map.php . I had the same problem, it seemed obvious that it would be route_map, but no.

*If you are looking to change the style of the map instead of the default,

Go to https://snazzymaps.com/ and find a map you like, then

Replace

var map = new google.maps.Map(document.getElementById("routemap"), options);

With this

var styles = PASTESTYLEHERE

// Create a new StyledMapType object, passing it the array of styles,
// as well as the name to be displayed on the map type control.
var styledMap = new google.maps.StyledMapType(styles,
{name: "Flight Map"});
// Create a map object, and include the MapTypeId to add
// to the map type control.
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(55.6468, 37.581),
mapTypeControlOptions: {
 mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
}
};
var map = new google.maps.Map(document.getElementById('routemap'),
mapOptions);

//Associate the styled map with the MapTypeId and set it to display.
map.mapTypes.set('map_style', styledMap);
map.setMapTypeId('map_style');

and replace PASTESTYLEHERE with your Javascript Style Array from snazzymaps

Link to comment
Share on other sites

This was a really great tip. Worked like a charm for me.

One key hint for new folks (I am also) that I would to share is where he states above:

 var style = PASTESTYLEHERE 

This is where you PASTE the start of Javascript code (the initial LEFT BRACKET), i.e.:

var style = [ 

Again, thanks for the tip!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...