[ka-Map-users] Initial zoom and center point, plus xmloverlay icon issue

Pg pg.navone at gmail.com
Thu Jul 27 16:42:36 EDT 2006


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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060727/8cb6de00/attachment.html


More information about the ka-Map-users mailing list