Jump to content

Change icon on google maps


airhaul

Recommended Posts

I made some route maps for different airlines with google maps...

That wasnt too bad

But stuck trying to change google icons to textual icons like with airport codes i.e KATL

Tried installing mapiconmaker but cant get it to work

Its using Gmap instead of google maps in javascript code. Think I have V3 api installed but everytime try to load even 1 icon simple example just get a grayed out map..

Or if you know a simplier way to add text to google icons would apprecitate.

Dont want to make custom icons but have code enter the airport codes when going through the schedules

Thanks for any help in the right direction

<script type="text/javascript" src="[url=".../mapiconmaker.js"[/url]"></script>
<script type="text/javascript">

var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.441944, -122.141944), 13);
var newIcon = MapIconMaker.createFlatIcon({width: 64, height: 64, primaryColor: "#00ff00"});
var marker = new GMarker(map.getCenter(), {icon: newIcon});
map.addOverlay(marker);
</script>
<div id="map" style="width: 500px; height: 300px"></div>

There is the simple example trying to get to load but keep getting gray map

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...