[OpenLayers-Users] 回复: graphicWidth symbol can't be used in IE

longsen 945070223 at qq.com
Tue Apr 2 00:15:23 PDT 2013


thanks!
I will try !

------------------
========================================================================================  
 

OpenGSC

专注OGC,玩儿转开源GIS!



 




------------------ 原始邮件 ------------------
发件人: "Andreas Hocevar"<ahocevar at opengeo.org>;
发送时间: 2013年4月2日(星期二) 下午2:49
收件人: "longsen"<945070223 at qq.com>; 
抄送: "openlayers-users"<openlayers-users at lists.osgeo.org>; 
主题: Re: [OpenLayers-Users] graphicWidth symbol can't be used in IE



To make IE9/10 use SVG, you have to use the html doctype for your HTML document:

<!DOCTYPE html>

Otherwise IE9/10 will enter a compatibility mode.

Andreas.

On Mon, Apr 1, 2013 at 10:11 AM, longsen <945070223 at qq.com> wrote:
> my code like this:
>       var style_blue = OpenLayers.Util.extend({},
> OpenLayers.Feature.Vector.style['default']);
>       style_blue.cursor='pointer';
>       style_blue.fontColor='#343434';
>       style_blue.externalGraphic="images/device/loufang.png";
>       style_blue.graphicHeight='16';
>       style_blue.graphicWidth='16';
>       var point = new
> OpenLayers.Geometry.Point(12576735.085414,3271755.6191489);
>       var pointFeatures = new OpenLayers.Feature.Vector(point, null,
> style_blue);
>       vector_layer_current.addFeatures([pointFeatures]);
> it works right in firefox,but it doesn't work in ie10/9;
> if I remove
> style_blue.graphicHeight='16';
>       style_blue.graphicWidth='16';
> it works right;
>
> ie9/10 already support svg.but OL 2.12 still render used vml.
>
> ------------------
> ========================================================================================
>
> OpenGSC
>
> 专注OGC,玩儿转开源GIS!
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130402/5c0e8b0e/attachment.html>


More information about the Users mailing list