def render(self, data, accepted_media_type=None, renderer_context=None):
renderer_context = renderer_context or {}<EOL>view = renderer_context['<STR_LIT>']<EOL>request = renderer_context['<STR_LIT>']<EOL>response = renderer_context['<STR_LIT>']<EOL>extra_context = renderer_context['<STR_LIT>']<EOL>obj = view.get_object()<EOL>if response.exception:<EOL><INDENT>template = self.get_exception_template(response)<EOL><DEDENT>else:<EOL><INDENT>template_names = self.get_template_names(response, view)<EOL>template = self.resolve_template(template_names)<EOL><DEDENT>context = self.resolve_context(data, request, response)<EOL>if response.exception:<EOL><INDENT>context.update({'<STR_LIT>': extra_context})<EOL>return template.render(context)<EOL><DEDENT>new_data = {<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>}<EOL>features = []<EOL>self.setup_icons_dict()<EOL>try:<EOL><INDENT>popup_template = Template(getattr(obj, '<STR_LIT>', None))<EOL><DEDENT>except TemplateSyntaxError as exception:<EOL><INDENT>popup_template = Template(exception)<EOL><DEDENT>try:<EOL><INDENT>marker_template = Template(getattr(obj, '<STR_LIT>', None))<EOL><DEDENT>except TemplateSyntaxError as exception:<EOL><INDENT>marker_template = Template(exception)<EOL><DEDENT>if isinstance(data, dict):<EOL><INDENT>features.append(self.process_feature(data, popup_template, marker_template))<EOL><DEDENT>else:<EOL><INDENT>for feature in data:<EOL><INDENT>features.append(self.process_feature(feature, popup_template, marker_template))<EOL><DEDENT><DEDENT>new_data['<STR_LIT>'] = features<EOL>if '<STR_LIT>' and '<STR_LIT>' not in extra_context:<EOL><INDENT>try:<EOL><INDENT>extra_context['<STR_LIT>'] = self.determine_extents(features)<EOL><DEDENT>except (StopIteration, BoundsError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>ret = json.dumps(new_data, cls=self.encoder_class, ensure_ascii=True)<EOL>if isinstance(ret, six.text_type):<EOL><INDENT>ret = bytes(ret.encode(self.charset))<EOL><DEDENT>context.update({'<STR_LIT:data>': ret, '<STR_LIT>': obj.markers, '<STR_LIT>': obj.template_header})<EOL>if '<STR_LIT>' in extra_context:<EOL><INDENT>extra_context['<STR_LIT>'] = json.dumps(extra_context['<STR_LIT>'].__geo_interface__)<EOL><DEDENT>context.update({'<STR_LIT>': extra_context})<EOL>return template.render(context)<EOL>
Renders data to HTML, using Django's standard template rendering.

The template name is determined by (in order of preference):

1. An explicit .template_name set on the response.
2. An explicit .template_name set on this class.
3. The return result of calling view.get_template_names().