[ka-Map-users] Initial zoom and center point,
plus xmloverlay icon issue
Alvin Clay
orionkamap at yahoo.com
Fri Jul 28 13:14:31 EDT 2006
I found this variable now, and it fixed the icon issue I was having.
Thanks.
Pg <pg.navone at gmail.com> wrote: xmlOverlayUseCanvas is a (dirty) global variable defined in kaXmlOverlay.js
After the directive
<script type="text/javascript" src="XMLOverlay/kaXmlOverlay.js"></script>
this variable should be globally defined and initialized to "true".
The use of this variable is described in the documentation of kaXmlOverlay that is in the JavaScript file, and is mirrored and beautified in
http://ka-map.ominiverdi.org/wiki/index.php/Overlay_API_Reference
If you can't find the xmlOverlayUseCanvas variable, probably you are using an old version of kaXmlOverlay. If this is the case, so my hint is not usefull for you.
-Pg
2006/7/27, Alvin Clay <orionkamap at yahoo.com>: Thanks. I got the extents working, but still don't have the icon issue sorted out.
I can't find the xmlOverlayUseCanvas variable, where is that?
- Alvin
Pg <pg.navone at gmail.com> wrote: In order to properly initialize kaXmlOverlay you should wait for the KAMAP_MAP_INITIALIZED event. So register an handler for that event
myKaMap.registerForEvent( KAMAP_MAP_INITIALIZED, null, mapInitializedHandler );
and move the kaXmlOverlay init in the mapInitializedHandler() function.
(See the doc in the source).
For the bad icon rendering, if you are using the CVS version, the default behaviour is to render icons with <canvas> or VML, in order to support rotation.
To render icons in the old traditional way set the variable
xmlOverlayUseCanvas = false;
before creating the overlay.
If this helps, please let me know which browser you're using.
-Pg
2006/7/26, Alvin Clay < orionkamap at yahoo.com>: What do I need to set to have the map start at a certain center point and zoom level, I tried this but only got blank maps and zoom was all the way at 0.
var map = getQueryParam('map');
var extents = [-75,40,8];
var cps = getQueryParam('cps');
myKaMap = new kaMap( 'viewport' );
var kaNav = new kaNavigator( myKaMap );
kaNav.activate();
myKaZoomer = new kaZoomer(myKaMap);
drawPage();
myKaMap.initialize( map, extents, cps );
myXmlOverlay = new kaXmlOverlay( myKaMap, 250 );
myXmlOverlay.loadXml('points.xml');
...........................
Also, I have a problem with the icon I created for overlays.
This is the icon graphic:
http://209.200.237.68/images/dot.gif
This is what is looks like on the map at all zoom levels:
http://209.200.237.69/images/dot_mistake.gif
This is the point info in the xml file:
<point x="-74.9" y="39.993" id="p3" redraw="true">
<label boxcolor="#000000" h="10" w="50" font="Arial" color="#FFFFFF" px="5" py="5">Point 3</label>
<icon src="/images/dot.gif" h="19" w="19" />
</point>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
ka-Map-users mailing list
ka-Map-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ka-map-users
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
_______________________________________________
ka-Map-users mailing list
ka-Map-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ka-map-users
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060728/a807a14c/attachment.html
More information about the ka-Map-users
mailing list